delete
Purpose
Instruct the P4ALTSYNC agent to delete a placeholder or hydrated file.
Input to agent
Key |
Value |
---|---|
altSync | delete
|
client | The client workspace name |
port | The P4PORT the client used to connect to the server |
user | The P4USER the client used to connect to the server |
path | The local syntax path of the file |
noclobber |
When |
rmdir |
|
The command might or might not include additional keys.
Action for the agent to perform
Delete the target file (hydrated or placeholder) unless noclobber
is set and the file is not read-only.
If rmdir
is set, recursively delete any directories made empty by this operation. If this command causes the parent directory to be empty, repeat the process of deleting that empty directory and deleting its parent directory, if empty. (However, do not delete the client root, even if it is empty.)
If the P4API default behavior for delete meets your needs (calling unlink
against the file system and then potentially calling rmdir
against any empty directories), the P4ALTSYNC agent can instruct the client to pass-through to the P4API’s delete logic by returning "result":"pass"
Output from the agent
Key |
Value |
---|---|
result |
Boolean true for success, or the string |
error | Description of what went wrong (applicable only if the result is boolean false or the string literal "error") |
Example of input and output
{"altSync":"move","client":"vfs-cmr5","path":"e:\\temp\\vfs\\cmr5\\2013\\2013-12-13\\P1020326.JPG","noclobber":true,"port":"perforce:1666","user":"npoole"}
{"result":"pass"}