chmod
Purpose
Instruct the P4ALTSYNC agent to change the permissions on a placeholder or hydrated file.
Input to agent
Key |
Value |
---|---|
altSync | chmod
|
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 |
clientFile | The client syntax path of the file |
depotFile | The depot syntax path of the file |
rev | The revision number of the file |
writable | true for writable, or false for read-only |
executable | true for executable, or false for not executable |
The command might or might not include additional keys.
Action for the agent to perform
Change the file’s attributes to make it either writable or read-only.
If the P4API default behavior meets your needs (calling chmod
against the file system), the P4ALTSYNC agent can instruct the client to pass-through to the P4API’s chmod logic by returning "result":"pass"
Output from the agent
Key |
Value |
---|---|
result | Boolean true for success, or the string "pass" to pass-through to the P4API’s chmod logic |
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":"chmod","client":"vfs-cmr5","clientFile":"//vfs-cmr5/test+k.txt","depotFile":"//depot/test+k.txt","path":"e:\\temp\\vfs\\cmr5\\test+k.txt","port":"perforce:1666","rev":2,"user":"npoole","writable":true,"executable":false}
{"result":"pass"}