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

P4 CLI Documentation | 2025.1

# P4 Server file types

P4 Server supports a set of file types that enable it to determine how files are stored by the P4 Server and whether the file can be diffed. When you add a file, P4 Server attempts to determine the type of the file automatically: P4 Server first determines whether the file is a regular file or a symbolic link, and then examines the first part of the file to determine whether it’s `text` or `binary`. If any non-text characters are found, the file is assumed to be `binary`; otherwise, the file is assumed to be `text`. (Files in Unicode environments are detected differently; see P4 Server file type detection and Unicode.

To determine the type of a file under P4 Server control, issue the `p4 opened` or `p4 files` command. To change the P4 Server file type, specify the `-t`filetype`` option. For details about changing file type, refer to the descriptions of `p4 add`, `p4 edit`, and `p4 reopen` in the P4 CLI Reference.

P4 Server supports the following file types:

Keyword | Description | Comments | Stored as
--- | --- | --- | ---
`binary` | Non-text file | Synced as binary files in the workspace. Stored compressed within the depot. | full file, compressed
`symlink` | Symbolic link | P4 Server applications on UNIX, macOS, recent versions of Windows treat these files as symbolic links. On other platforms, these files appear as (small) text files. | delta
`text` | Text file | Synced as text in the workspace. Line-ending translations are performed automatically. | delta
`unicode` | Unicode file | P4 Server operating in Unicode mode support the `unicode` file type. These files are translated into the local character set specified by `P4CHARSET`. P4 Server not in Unicode mode do not support the `unicode` file type. For details, see the Internationalization Notes. | delta, UTF-8
`utf8` | Unicode file | Whether the service is in Unicode mode or not, files that are detected as UTF8 will be stored as UTF8 and synced as UTF8 without being translated by the `P4CHARSET` setting. For details, see the Internationalization Notes. | delta, UTF-8
`utf16` | Unicode file | Whether the service is in Unicode mode or not, files are transferred as UTF-8, and translated to UTF-16 (with byte order mark, in the byte order appropriate for the user’s computer) in the client workspace. For details, see the Internationalization Notes. | delta, UTF-8

See Task streams and Virtual streams.

Your search for returned results