pub struct Delete { /* private fields */ }Expand description
p4 [g-opts] delete [-c PendingChangelist] [-n -k -v] [--remote=remote] FileSpec1 [[FileSpec]2 ...]
Open files in a client workspace for deletion from the depot.
Implementations§
Source§impl Delete
impl Delete
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 deletion from 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_changelist(&self) -> Option<&String>
pub fn get_changelist(&self) -> Option<&String>
§Description
-c PendingChangelist
Opens files for delete and associates the deletion action with the specified pending changelist.
If no pending changelist is specified, the deletion action is associated with the default changelist.
Sourcepub fn set_changelist(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_changelist(&mut self, v: impl Into<String>) -> &mut Self
§Description
-c PendingChangelist
Opens files for delete and associates the deletion action with the specified pending changelist.
If no pending changelist is specified, the deletion action is associated with the default changelist.
Sourcepub fn changelist(self, v: impl Into<String>) -> Self
pub fn changelist(self, v: impl Into<String>) -> Self
§Description
-c PendingChangelist
Opens files for delete and associates the deletion action with the specified pending changelist.
If no pending changelist is specified, the deletion action is associated with the default changelist.
Sourcepub fn get_preview(&self) -> bool
pub fn get_preview(&self) -> bool
§Description
-n
Preview which files would be opened for delete, 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 delete, 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 delete, without actually changing any files or metadata.
Sourcepub fn get_keep_localfile(&self) -> bool
pub fn get_keep_localfile(&self) -> bool
§Description
-k
Delete the file on the shared versioning service, but keep a copy of the deleted file in your workspace.
Sourcepub fn set_keep_localfile(&mut self, v: bool) -> &mut Self
pub fn set_keep_localfile(&mut self, v: bool) -> &mut Self
§Description
-k
Delete the file on the shared versioning service, but keep a copy of the deleted file in your workspace.
Sourcepub fn keep_localfile(self, v: bool) -> Self
pub fn keep_localfile(self, v: bool) -> Self
§Description
-k
Delete the file on the shared versioning service, but keep a copy of the deleted file in your workspace.
Sourcepub fn get_delete_unsynced(&self) -> bool
pub fn get_delete_unsynced(&self) -> bool
§Description
-v
Delete a file that is not synced into the client workspace.
To use this option, specify these files in depot syntax; because such files are not synced, client syntax or local syntax can introduce ambiguities in the list of files to delete. (If the files are synced, p4 delete -v file removes the files from your workspace in addition to opening them for deletion.)
To delete a set of files without transferring them to your workstation when another version of these files already exists in your workspace, use p4 sync -k file, followed by p4 delete -k file. This allows you to delete a file that is in the depot without affecting the file (by the same name) in your workspace. For example, if you have myfile version 5 in the depot and myfile version 6 in your workspace, this sequence of commands, allows you to keep version 6 but delete version 5. If you don’t do this and just do p4 delete -v, it will delete version 5 in the depot and version 6 in the workspace.
Sourcepub fn set_delete_unsynced(&mut self, v: bool) -> &mut Self
pub fn set_delete_unsynced(&mut self, v: bool) -> &mut Self
§Description
-v
Delete a file that is not synced into the client workspace.
To use this option, specify these files in depot syntax; because such files are not synced, client syntax or local syntax can introduce ambiguities in the list of files to delete. (If the files are synced, p4 delete -v file removes the files from your workspace in addition to opening them for deletion.)
To delete a set of files without transferring them to your workstation when another version of these files already exists in your workspace, use p4 sync -k file, followed by p4 delete -k file. This allows you to delete a file that is in the depot without affecting the file (by the same name) in your workspace. For example, if you have myfile version 5 in the depot and myfile version 6 in your workspace, this sequence of commands, allows you to keep version 6 but delete version 5. If you don’t do this and just do p4 delete -v, it will delete version 5 in the depot and version 6 in the workspace.
Sourcepub fn delete_unsynced(self, v: bool) -> Self
pub fn delete_unsynced(self, v: bool) -> Self
§Description
-v
Delete a file that is not synced into the client workspace.
To use this option, specify these files in depot syntax; because such files are not synced, client syntax or local syntax can introduce ambiguities in the list of files to delete. (If the files are synced, p4 delete -v file removes the files from your workspace in addition to opening them for deletion.)
To delete a set of files without transferring them to your workstation when another version of these files already exists in your workspace, use p4 sync -k file, followed by p4 delete -k file. This allows you to delete a file that is in the depot without affecting the file (by the same name) in your workspace. For example, if you have myfile version 5 in the depot and myfile version 6 in your workspace, this sequence of commands, allows you to keep version 6 but delete version 5. If you don’t do this and just do p4 delete -v, it will delete version 5 in the depot and version 6 in the workspace.
Sourcepub fn get_remote(&self) -> Option<&String>
pub fn get_remote(&self) -> Option<&String>
§Description
--remote=remote
Opens the file for delete in your personal server, and additionally —
if the file is of type +l — takes a global exclusive lock on the file
in the shared server from which you cloned the file.
Sourcepub fn set_remote(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_remote(&mut self, v: impl Into<String>) -> &mut Self
§Description
--remote=remote
Opens the file for delete in your personal server, and additionally —
if the file is of type +l — takes a global exclusive lock on the file
in the shared server from which you cloned the file.
Trait Implementations§
Source§impl<S, I> ParameterizedSpawn<(S,)> for Delete
impl<S, I> ParameterizedSpawn<(S,)> for Delete
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 delete 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.