Perforce file types
Perforce assigns file types to determine whether files can be diffed and how they are stored. Perforce file types are as follows:
- text:Assigned to a file that contains only ASCII text.
- binary: Assigned to a non-text file. By default, the contents of each revision are stored in full and the file is stored in compressed format.
- symlink: Assigned to a non-text file. By default, the contents of each revision are stored in full, and the file is stored in compressed format.
- apple: Assigned to files that are stored using AppleSingle format, permitting the data fork and resource fork to be stored as a single file.
- unicode: Assigned to text files containing international characters on a P4 Server operating in internationalized mode
You can set the following file type modifiers:
- +x: Execute bit set. Use for executable files.
- +w: File is always writable in workspace. (P4 Server manages the write bit, and files that are not checked out are, by default, not writable.)
- +k: Enable RCS keyword expansion. If you submit text files containing
the keywords listed below, P4 Server expands them before storing them. Supported
keywords are:
- $Id$: File name and revision number in P4 Server depot syntax.
- $Header$: Same as $Id.
- $Date$: Date of submission in format YYYY/MM/DD.
- $DateTime$: Date and time of last submission in format YYYY/MM/DD hh:mm:ss. Date and time are as of the local time on the P4 Server at time of submission.
- $Change$: Number of changelist The changes to files or stream specifications along with metadata, such as the list of changed files, their version numbers, the submitter of the changelist, and the submitter's description of the changes. A changelist is the unit of versioned work. in which file was submitted.
- $File$: File name in depot syntax (without revision number).
- $Revision$: P4 Server revision number of file.
- $Author$: Perforce user name of submitter.
- +l: Exclusive open (locking). If set, only one user at a time will be able to open a file for editing. Useful for binary file types, which cannot be merged.
- +C: Server stores the full compressed version of each file revision. (Binary files are always stored this way.)
- +D: Server stores deltas in RCS format (Default server storage mechanism for text files.)
- +F: Server stores full file per revision. Useful for long ASCII files that aren't read by users as text, such as PostScript files.
- +S: Server stores only the head revision. Useful for executable or .obj files.
- +m: Preserve original modtime. The file's timestamp on the local filesystem is preserved upon submission and restored upon sync. Useful for third-party DLLs in Windows environments.