When you add a new file to a Perforce depot, Perforce stores its contents according to its type. In addition, Perforce uses a file's type to determine how it gets written into a client workspace.
A Perforce filetype consists of a base type (text, binary, etc.) plus a modifier (uncompressed, writeable, etc.). You specify a Perforce filetype as base+modifier(s). For example:
text+kxis an executable text file with keyword expansion -- its base type is "text"; its modifiers are "keyword expansion" and "executable". Use this format when changing filetypes. You can also use this format when opening files for add, edit, or integrate, if you want to override the default filetype.
Type | Client workspace appearance | Perforce server storage |
---|---|---|
text | Newlines translated according to client platform convention | Text; reverse-delta (RCS) format |
binary | Raw bytes | One file per revision; compressed |
symlink | Symbolic link on Unix; same as text on other platforms | See "text" |
apple | Mac resource + data | One file per revision; compressed |
resource | Mac resource fork | One file per revision; compressed |
Modifier | Meaning |
---|---|
+x | Workspace file has executable bit set |
+w | Workspace file is writable |
+k | Workspace file has keywords expanded |
+C | Server stores each revision as compressed binary |
+D | Server stores each revision as text deltas |
+F | Server stores uncompressed file content |
+S | Server stores only single head revision |
The following type aliases exist for backwards compatibility with earlier revisions of Perforce:
Type | Is Base Type | Plus Modifiers |
---|---|---|
ctext | text | +C |
cxtext | text | +Cx |
ktext | text | +k |
kxtext | text | +kx |
ltext | text | +F |
tempobj | binary | +Sw |
ubinary | binary | +F |
uresource | resource | +F |
uxbinary | binary | +Fx |
xbinary | binary | +x |
xltext | text | +Fx |
xtempobj | binary | +Swx |
xtext | text | +x |