Perforce supports a set of Base filetypes. File type modifiers are then applied to the base types allowing for support of RCS keyword expansion, file compression, and more.
When adding files, Helix server:
- examines the typemap table to see if the system administrator has defined a file type for the file(s) being added. If a match is found, the file’s type is set as defined in the typemap table. (See also p4 typemap)
- If a match is
examines the first bytes of the file based on the
filesys.binaryscanconfigurable (by default, 65536 bytes) to determine whether it is
binary, and the files are stored in the depot accordingly.
By default, text file revisions are stored in reverse delta format.
Newly-added text files larger than the limit imposed by the
filetype.maxtextsize configurable (by default, 10 MB) are
text+C and stored in full. Files
compressed in the
.zip format (including
files) are also automatically detected and assigned the type
ubinary. Other binary revisions are stored in full, with
(Files in unicode environments are detected differently. For details, see the Internationalization Notes.)
Helix server administrators can use the
- type mapping feature (
p4 typemap) to override Perforce’s default file type detection mechanism. This feature is useful for
binaryfile formats (such as Adobe PDF, or Rich Text Format) where files can start with large portions of ASCII text, and might otherwise be mistaken for
p4 configure) to change the default limits of 65536 bytes for text/binary detection and the 10 MB RCS text file size limit.