Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Virtual File Service Documentation | 2026.1

# added

## Purpose

Instruct the P4ALTSYNC agent to update a file with placeholder state information.

## Input to agent

Key | Value
--- | ---
altSync | `added`
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 to create a placeholder for
clientFile | The client syntax path of the file to create a placeholder for
depotFile | The depot syntax path of the file to create a placeholder for
rev | The revision number of the file to create a placeholder for
digest | The server’s digest for depotFile (this is the MD5 of the file as it’s stored on the server) - Only if the server has a digest to send
fileSize | The size of the file on the client in bytes (this might differ from the fileSize returned from `p4 fstat`)
writable | `true` for writable, or `false` for read-only
executable | `true` for executable, or `false` for not executable
fileType | The type of file, such as `binary+l` or `text`. See File types in P4 CLI Reference.
keywords | If `0` or unset, the file must be hydrated without keyword expansion (`p4 print -K`)
lineEnd | The line ending to hydrate text files with (`p4 print -L unix/win/mac`)
utf8bom | The UTF8 BOM setting to use when hydrating utf8 type files (`p4 print -B0/1/2`)
charset | The charset to hydrate unicode type files with (`p4 print -Q charset`) Note: this might be the charset’s numeric form, but `p4 print -Q` will accept either numeric or named forms.

The command might or might not include additional keys.

## Action for the agent to perform

The target file should already exist, but might not have the correct state if the P4ALTSYNC agent maintains state with hydrated files: use this information to update the state.

The `charset`, `utf8bom`, `lineEnd` and `keywords` flags are provided for the P4ALTSYNC agent to store so that the hydration (likely via `p4 print`) can be performed in the same way that the action invoking the `add` command would have written the file if P4ALTSYNC were not in use.

## Output from the agent

Key | Value
--- | ---
result | Boolean true for success
error | Description of what went wrong (only applicable if result is non-zero)

## Example of input and output

Input:

Copy

    {"altSync":"added","client":"vfs-cmr5","clientFile":"//vfs-cmr5/2013/2013-12-13/P1020326.JPG","depotFile":"//depot/2013/2013-12-13/P1020326.JPG","digest":"6939819742BB416BFD89512C66B58975","fileSize":5147136,"path":"e:\\temp\\vfs\\cmr5\\2013\\2013-12-13\\P1020326.JPG","port":"perforce:1666","rev":1,"user":"npoole","writable":true,"executable":false,"fileType":"binary+l"}

Output:

    {"result":true}

Your search for returned results