pub struct Add { /* private fields */ }Expand description
p4 [g-opts] add [-c changelist] [-d -f -I -n] [-t filetype] file ...
Open files in a client workspace for addition to the depot.
Implementations§
Source§impl Add
impl Add
Sourcepub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
Open files in a client workspace for addition to the depot.
bin is the path to the Perforce command-line executable.
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_change_list(&self) -> Option<&String>
pub fn get_change_list(&self) -> Option<&String>
§Description
-c changelist
Opens the files for add within the specified changelist. If this option is not used, the files are linked to the default changelist.
Sourcepub fn set_change_list(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_change_list(&mut self, v: impl Into<String>) -> &mut Self
§Description
-c changelist
Opens the files for add within the specified changelist. If this option is not used, the files are linked to the default changelist.
Sourcepub fn change_list(self, v: impl Into<String>) -> Self
pub fn change_list(self, v: impl Into<String>) -> Self
§Description
-c changelist
Opens the files for add within the specified changelist. If this option is not used, the files are linked to the default changelist.
Sourcepub fn get_downgrade(&self) -> bool
pub fn get_downgrade(&self) -> bool
Sourcepub fn set_downgrade(&mut self, v: bool) -> &mut Self
pub fn set_downgrade(&mut self, v: bool) -> &mut Self
Sourcepub fn get_force_literal_filenames(&self) -> bool
pub fn get_force_literal_filenames(&self) -> bool
§Description
-f
Use the -f option to force inclusion of wildcards in filenames. See File specifications for details.
Filenames that contain the special characters ‘@’, ‘#’, ‘%’, or ‘*’ are reformatted to encode the characters using ASCII hexadecimal representation. After the files are added, refer to them using the reformatted file name instead of the local file system name.
Sourcepub fn set_force_literal_filenames(&mut self, v: bool) -> &mut Self
pub fn set_force_literal_filenames(&mut self, v: bool) -> &mut Self
§Description
-f
Use the -f option to force inclusion of wildcards in filenames. See File specifications for details.
Filenames that contain the special characters ‘@’, ‘#’, ‘%’, or ‘*’ are reformatted to encode the characters using ASCII hexadecimal representation. After the files are added, refer to them using the reformatted file name instead of the local file system name.
Sourcepub fn force_literal_filenames(self, v: bool) -> Self
pub fn force_literal_filenames(self, v: bool) -> Self
§Description
-f
Use the -f option to force inclusion of wildcards in filenames. See File specifications for details.
Filenames that contain the special characters ‘@’, ‘#’, ‘%’, or ‘*’ are reformatted to encode the characters using ASCII hexadecimal representation. After the files are added, refer to them using the reformatted file name instead of the local file system name.
Sourcepub fn get_skip_ignore(&self) -> bool
pub fn get_skip_ignore(&self) -> bool
Sourcepub fn set_skip_ignore(&mut self, v: bool) -> &mut Self
pub fn set_skip_ignore(&mut self, v: bool) -> &mut Self
Sourcepub fn skip_ignore(self, v: bool) -> Self
pub fn skip_ignore(self, v: bool) -> Self
Sourcepub fn get_preview(&self) -> bool
pub fn get_preview(&self) -> bool
§Description
-n
Preview which files would be opened for add, without actually changing any files or metadata.
Sourcepub fn set_preview(&mut self, v: bool) -> &mut Self
pub fn set_preview(&mut self, v: bool) -> &mut Self
§Description
-n
Preview which files would be opened for add, without actually changing any files or metadata.
Sourcepub fn preview(self, v: bool) -> Self
pub fn preview(self, v: bool) -> Self
§Description
-n
Preview which files would be opened for add, without actually changing any files or metadata.
Sourcepub fn get_filetype(&self) -> Option<&String>
pub fn get_filetype(&self) -> Option<&String>
§Description
-t filetype
Adds the file as the specified filetype, overriding any settings in the typemap table. See Base file types and modifiers as well as the lbr.autocompress configurable.
Sourcepub fn set_filetype(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_filetype(&mut self, v: impl Into<String>) -> &mut Self
§Description
-t filetype
Adds the file as the specified filetype, overriding any settings in the typemap table. See Base file types and modifiers as well as the lbr.autocompress configurable.
Trait Implementations§
Source§impl<S, I> ParameterizedSpawn<(S,)> for Add
impl<S, I> ParameterizedSpawn<(S,)> for Add
Source§fn spawn_with(&mut self, (input): (S,)) -> Result<Self::Output, Self::Error>
fn spawn_with(&mut self, (input): (S,)) -> Result<Self::Output, Self::Error>
Spawns p4 add for the given files as a child process.
The child process inherits the standard input, output, and error
streams of the current process, and runs asynchronously; use the
returned Child handle to wait for it or interact with it.