P4Web Release 2005.1 User Guide
[Getting Started]  [How To...]  [Browser Tips]  [Glossary]  [Road Map]  

Filetypes

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+kx
is 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.

Base filetypes

Type Client workspace appearance Perforce server storage
text Text Text; reverse-delta (RCS) format
binary Raw bytes One file per revision; compressed
symlink Symbolic link on Unix; text on other platforms Text; content is name of linked file
resource Unicode file Stored as UTF-8
apple Mac resource + data One file per revision; compressed
unicode Mac resource fork One file per revision; compressed

Filetype modifiers

Modifier Meaning
+mWorkspace file's modtime is set to submit time instead of sync time
+wWorkspace file is writable
+xWorkspace file is executable
+kWorkspace file has RCS keywords expanded
+koWorkspace file has RCS keywords expanded (Id + Header only)
+lServer allows only one user and workspace at a time to have the file opened
+SServer stores only single head revision
+CServer stores each revision as compressed binary
+DServer stores each revision as text deltas
+FServer stores uncompressed file content

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
xbinary binary +x
xltext text +Fx
xtempobj binary +Swx
xtext text +x


Copyright 2005 Perforce Software. All rights reserved.