Struct DirsCommand

Source
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>

Source

pub fn new(connection: &'p P4, dir: &'f str) -> Self

Source

pub fn dir(self, dir: &'f str) -> Self

Source

pub fn client_only(self, client_only: bool) -> Self

The -C flag lists only directories that fall within the current client view.

Source

pub fn set_stream(self, stream: &'s str) -> Self

The -S flag limits output to depot directories mapped in a stream’s client view.

Source

pub fn include_deleted(self, include_deleted: bool) -> Self

The -D flag includes directories containing only deleted files.

Source

pub fn include_synced(self, include_synced: bool) -> Self

The -H flag lists directories containing files synced to the current client workspace.

Source

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.

Source

pub fn run(self) -> Result<Dirs, P4Error>

Run the dirs command.

Trait Implementations§

Source§

impl<'p, 'f, 's> Clone for DirsCommand<'p, 'f, 's>

Source§

fn clone(&self) -> DirsCommand<'p, 'f, 's>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'p, 'f, 's> Debug for DirsCommand<'p, 'f, 's>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'p, 'f, 's> Freeze for DirsCommand<'p, 'f, 's>

§

impl<'p, 'f, 's> RefUnwindSafe for DirsCommand<'p, 'f, 's>

§

impl<'p, 'f, 's> Send for DirsCommand<'p, 'f, 's>

§

impl<'p, 'f, 's> Sync for DirsCommand<'p, 'f, 's>

§

impl<'p, 'f, 's> Unpin for DirsCommand<'p, 'f, 's>

§

impl<'p, 'f, 's> UnwindSafe for DirsCommand<'p, 'f, 's>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.