Skip to main content

Dirs

Struct Dirs 

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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>

Source

pub fn get_client_mapped_only(&self) -> bool

§Description

-C

Display only those directories that are mapped through the current client view.

Source

pub fn set_client_mapped_only(&mut self, v: bool) -> &mut Self

§Description

-C

Display only those directories that are mapped through the current client view.

Source

pub fn client_mapped_only(self, v: bool) -> Self

§Description

-C

Display only those directories that are mapped through the current client view.

Source

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.

Source

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.

Source

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.

Source

pub fn get_stream(&self) -> Option<&str>

§Description

-S stream

List directories mapped for the specified stream.

Source

pub fn set_stream(&mut self, v: impl Into<String>) -> &mut Self

§Description

-S stream

List directories mapped for the specified stream.

Source

pub fn stream(self, v: impl Into<String>) -> Self

§Description

-S stream

List directories mapped for the specified stream.

Source

pub fn get_case_insensitive(&self) -> bool

§Description

-i

Ignore the case of the directory argument when listing directories in a case-sensitive server.

Source

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.

Source

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.

Source

pub fn get_ignore_changeview(&self) -> bool

§Description

--ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source

pub fn set_ignore_changeview(&mut self, v: bool) -> &mut Self

§Description

--ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source

pub fn ignore_changeview(self, v: bool) -> Self

§Description

--ignore-changeview

Remove the changelist limit on depot paths. See ChangeView in p4 client.

Source§

impl<M: ExclusiveOption> Dirs<M>

Source

pub fn get_bin(&self) -> &Path

Get the Perforce command path.

Source

pub fn set_bin(&mut self, bin: impl Into<PathBuf>) -> &mut Self

Set the Perforce command path.

Source

pub fn bin(self, bin: impl Into<PathBuf>) -> Self

Set the Perforce command path.

Source

pub fn get_global_opts(&self) -> &GlobalOpts

§Description

g-opts

See Global options.

Source

pub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self

§Description

g-opts

See Global options.

Source

pub fn global_opts(self, v: GlobalOpts) -> Self

§Description

g-opts

See Global options.

Source

pub fn get_include_deleted(&self) -> bool

§Description

-D

Include subdirectories that contain only deleted files. By default, these directories are not displayed.

Source

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.

Source

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

§Description

-D

Include subdirectories that contain only deleted files. By default, these directories are not displayed.

Trait Implementations§

Source§

impl<M: Clone> Clone for Dirs<M>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<M: Debug> Debug for Dirs<M>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<M: Default> Default for Dirs<M>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<M: ExclusiveOption> ParameterizedSpawn<()> for Dirs<M>

Source§

fn spawn_with(&mut self, (): ()) -> Result<Self::Output, Self::Error>

Spawns p4 dirs without directory arguments as a child process with piped standard output and error streams.

Source§

type Output = Child

Source§

type Error = Error

Source§

impl<M, S, I> ParameterizedSpawn<(S,)> for Dirs<M>
where M: ExclusiveOption, S: IntoIterator<Item = I>, I: AsRef<OsStr>,

Source§

fn spawn_with( &mut self, (directories): (S,), ) -> Result<Self::Output, Self::Error>

Spawns p4 dirs for the given depot directories as a child process with piped standard output and error streams.

Source§

type Output = Child

Source§

type Error = Error

Source§

impl<M: ExclusiveOption> SubCommand for Dirs<M>

Source§

fn name(&self) -> &str

Source§

fn inject_local_args(&self, command: &mut Command)

Source§

fn global_opts(&self) -> Option<&GlobalOpts>

Source§

fn inject_args(&self, command: &mut Command)

Source§

fn setup_command<S: AsRef<OsStr>>(&self, bin: S) -> Command

Auto Trait Implementations§

§

impl<M> Freeze for Dirs<M>
where M: Freeze,

§

impl<M> RefUnwindSafe for Dirs<M>
where M: RefUnwindSafe,

§

impl<M> Send for Dirs<M>
where M: Send,

§

impl<M> Sync for Dirs<M>
where M: Sync,

§

impl<M> Unpin for Dirs<M>
where M: Unpin,

§

impl<M> UnsafeUnpin for Dirs<M>
where M: UnsafeUnpin,

§

impl<M> UnwindSafe for Dirs<M>
where M: UnwindSafe,

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> OutputExt for T
where T: SpawnExt<Output = Child, Error = Error>,

Source§

impl<T, T1> OutputExt1<T1> for T
where T: SpawnExt1<T1, Output = Child, Error = Error>,

Source§

fn output( &mut self, a: T1, ) -> Result<Output, <T as ParameterizedSpawn<(T1,)>>::Error>

Source§

impl<T, I> ParameterizedOutput<I> for T
where T: ParameterizedSpawn<I, Output = Child, Error = Error>,

Source§

type Error = Error

Source§

fn output_with( &mut self, input: I, ) -> Result<Output, <T as ParameterizedOutput<I>>::Error>

Source§

impl<T> SpawnExt for T

Source§

fn spawn( &mut self, ) -> Result<<T as ParameterizedSpawn<()>>::Output, <T as ParameterizedSpawn<()>>::Error>

Source§

impl<T, T1> SpawnExt1<T1> for T

Source§

fn spawn( &mut self, a: T1, ) -> Result<<T as ParameterizedSpawn<(T1,)>>::Output, <T as ParameterizedSpawn<(T1,)>>::Error>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.