pub struct Dirs<M = Unselected> { /* private fields */ }Expand description
p4 [g-opts] dirs [-C -D -H] [-S stream] [-i] depot_directories*[revSpec]
p4 [g-opts] dirs [-D] [--streamviews] depot_directories*[revSpec]
p4 [g-opts] dirs [-D] [[-C] [-H] [-S stream] [-i] [--ignore-changeview] | [--streamviews]] depot_directories*[revSpec]
Lists the immediate subdirectories of the specified depot directories.
p4 dirs is meant to be used in scripts rather than from the command line.
If you use streams, you must provide the depot_directories argument in depot syntax. Otherwise, you can use depot or local syntax. The argument must end with the * wildcard.
p4 dirs only lists the immediate subdirectories of the directory
arguments.
By default, only subdirectories that contain at least one undeleted file
are returned; Self::include_deleted (-D) also lists subdirectories
that contain only deleted files.
If you include a revision specifier or revision range as part of a directory argument, the only subdirectories returned are those that contain at least one file revision that matches the given specifier.
§Usage notes
P4 Server does not track directories in its database. Therefore, the ... wildcard is not supported.
Implementations§
Source§impl Dirs<Unselected>
impl Dirs<Unselected>
Sourcepub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
Creates a new p4 dirs command.
bin is the path to the Perforce command-line executable.
Sourcepub fn client_mapped_only(self) -> Dirs<WorkspaceView>
pub fn client_mapped_only(self) -> Dirs<WorkspaceView>
§Description
-C
Display only those directories that are mapped through the current client view.
Enters the WorkspaceView form with WorkspaceView’s
client_mapped_only flag set.
Sourcepub fn client_have_list_only(self) -> Dirs<WorkspaceView>
pub fn client_have_list_only(self) -> Dirs<WorkspaceView>
§Description
-H
Include only those directories that contain files on the current
client workspace’s p4 have list.
Enters the WorkspaceView form with WorkspaceView’s
client_have_list_only flag set.
Sourcepub fn stream(self, v: impl Into<String>) -> Dirs<WorkspaceView>
pub fn stream(self, v: impl Into<String>) -> Dirs<WorkspaceView>
§Description
-S stream
List directories mapped for the specified stream.
Enters the WorkspaceView form with the stream selected.
Sourcepub fn case_insensitive(self) -> Dirs<WorkspaceView>
pub fn case_insensitive(self) -> Dirs<WorkspaceView>
§Description
-i
Ignore the case of the directory argument when listing directories in a case-sensitive server.
Enters the WorkspaceView form with WorkspaceView’s
case_insensitive flag set.
Sourcepub fn ignore_changeview(self) -> Dirs<WorkspaceView>
pub fn ignore_changeview(self) -> Dirs<WorkspaceView>
§Description
--ignore-changeview
Remove the changelist limit on depot paths. See ChangeView in
p4 client.
Enters the WorkspaceView form with WorkspaceView’s
ignore_changeview flag set.
Sourcepub fn stream_view(self) -> Dirs<StreamView>
pub fn stream_view(self) -> Dirs<StreamView>
§Description
--streamviews
Report files and directories from stream paths and components, where imported files are represented as symbolic links under the stream depot path.
Enters the StreamView form.
Source§impl Dirs<WorkspaceView>
impl Dirs<WorkspaceView>
Sourcepub fn get_client_mapped_only(&self) -> bool
pub fn get_client_mapped_only(&self) -> bool
Sourcepub fn set_client_mapped_only(&mut self, v: bool) -> &mut Self
pub fn set_client_mapped_only(&mut self, v: bool) -> &mut Self
Sourcepub fn client_mapped_only(self, v: bool) -> Self
pub fn client_mapped_only(self, v: bool) -> Self
Sourcepub fn get_client_have_list_only(&self) -> bool
pub fn get_client_have_list_only(&self) -> bool
§Description
-H
Include only those directories that contain files on the current
client workspace’s p4 have list.
Sourcepub fn set_client_have_list_only(&mut self, v: bool) -> &mut Self
pub fn set_client_have_list_only(&mut self, v: bool) -> &mut Self
§Description
-H
Include only those directories that contain files on the current
client workspace’s p4 have list.
Sourcepub fn client_have_list_only(self, v: bool) -> Self
pub fn client_have_list_only(self, v: bool) -> Self
§Description
-H
Include only those directories that contain files on the current
client workspace’s p4 have list.
Sourcepub fn get_stream(&self) -> Option<&str>
pub fn get_stream(&self) -> Option<&str>
Sourcepub fn set_stream(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_stream(&mut self, v: impl Into<String>) -> &mut Self
Sourcepub fn get_case_insensitive(&self) -> bool
pub fn get_case_insensitive(&self) -> bool
§Description
-i
Ignore the case of the directory argument when listing directories in a case-sensitive server.
Sourcepub fn set_case_insensitive(&mut self, v: bool) -> &mut Self
pub fn set_case_insensitive(&mut self, v: bool) -> &mut Self
§Description
-i
Ignore the case of the directory argument when listing directories in a case-sensitive server.
Sourcepub fn case_insensitive(self, v: bool) -> Self
pub fn case_insensitive(self, v: bool) -> Self
§Description
-i
Ignore the case of the directory argument when listing directories in a case-sensitive server.
Sourcepub fn get_ignore_changeview(&self) -> bool
pub fn get_ignore_changeview(&self) -> bool
Sourcepub fn set_ignore_changeview(&mut self, v: bool) -> &mut Self
pub fn set_ignore_changeview(&mut self, v: bool) -> &mut Self
Sourcepub fn ignore_changeview(self, v: bool) -> Self
pub fn ignore_changeview(self, v: bool) -> Self
Source§impl<M: ExclusiveOption> Dirs<M>
impl<M: ExclusiveOption> Dirs<M>
Sourcepub fn get_global_opts(&self) -> &GlobalOpts
pub fn get_global_opts(&self) -> &GlobalOpts
Sourcepub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self
pub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self
Sourcepub fn global_opts(self, v: GlobalOpts) -> Self
pub fn global_opts(self, v: GlobalOpts) -> Self
Sourcepub fn get_include_deleted(&self) -> bool
pub fn get_include_deleted(&self) -> bool
§Description
-D
Include subdirectories that contain only deleted files. By default, these directories are not displayed.
Sourcepub fn set_include_deleted(&mut self, v: bool) -> &mut Self
pub fn set_include_deleted(&mut self, v: bool) -> &mut Self
§Description
-D
Include subdirectories that contain only deleted files. By default, these directories are not displayed.
Sourcepub fn include_deleted(self, v: bool) -> Self
pub fn include_deleted(self, v: bool) -> Self
§Description
-D
Include subdirectories that contain only deleted files. By default, these directories are not displayed.