pub struct DirsCommand<'p, 'f, 's> { /* private fields */ }
Expand description
List depot subdirectories
List directories that match the specified file pattern (dir). This command does not support the recursive wildcard (…). Use the * wildcard instead.
Perforce does not track directories individually. A path is treated as a directory if there are any undeleted files with that path as a prefix.
By default, all directories containing files are listed. If the dir argument includes a revision range, only directories containing files in the range are listed. For details about specifying file revisions, see ‘p4 help revisions’.
§Examples
let p4 = p4_cmd::P4::new();
let dirs = p4.dirs("//depot/dir/*").run().unwrap();
for dir in dirs {
println!("{:?}", dir);
}
Implementations§
Source§impl<'p, 'f, 's> DirsCommand<'p, 'f, 's>
impl<'p, 'f, 's> DirsCommand<'p, 'f, 's>
pub fn new(connection: &'p P4, dir: &'f str) -> Self
pub fn dir(self, dir: &'f str) -> Self
Sourcepub fn client_only(self, client_only: bool) -> Self
pub fn client_only(self, client_only: bool) -> Self
The -C flag lists only directories that fall within the current client view.
Sourcepub fn set_stream(self, stream: &'s str) -> Self
pub fn set_stream(self, stream: &'s str) -> Self
The -S flag limits output to depot directories mapped in a stream’s client view.
Sourcepub fn include_deleted(self, include_deleted: bool) -> Self
pub fn include_deleted(self, include_deleted: bool) -> Self
The -D flag includes directories containing only deleted files.
Sourcepub fn include_synced(self, include_synced: bool) -> Self
pub fn include_synced(self, include_synced: bool) -> Self
The -H flag lists directories containing files synced to the current client workspace.
Sourcepub fn ignore_case(self, ignore_case: bool) -> Self
pub fn ignore_case(self, ignore_case: bool) -> Self
The -i flag is used to ignore the case of the file pattern when listing directories in a case sensitive server. This flag is not compatible with the -C option.
Trait Implementations§
Source§impl<'p, 'f, 's> Clone for DirsCommand<'p, 'f, 's>
impl<'p, 'f, 's> Clone for DirsCommand<'p, 'f, 's>
Source§fn clone(&self) -> DirsCommand<'p, 'f, 's>
fn clone(&self) -> DirsCommand<'p, 'f, 's>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more