What is the maximum filename character length of files in OS X?
Of secondary importance is whether some characters are allowed/disallowed in addition to any overall length restrictions.
From the font of all knowledge, the maximum file name size in the default HFS+ file system is 255 UTF-16 encoding units, so basically 255 characters. Technically, any unicode character can be used, but this may be practically limited by the application you are using - for example, the
Yes - you should keep file names to 255 characters but paths can be longer but not as long as some other unix allows.
The desktop OS X supports ten major filesystems (HFS, HFS Plus, UFS, WebDAV, UDF, FAT, SMB/CIFS, AFP, NFS, and FTP) with several variants of some of these. See table 1 at developer.apple.com's article below for details:
The system default filesystem, HFS plus supports filenames of 255 UTF-16 encoding units and the only reserved character is
By convention, software should use file handles and are responsible for allocating enough space to contain an arbitrarily long file path if it doesn't use standard API for navigating the filesystem structure to locate a 255 length filename.