FSFileName
The name of a file, expressed as a data buffer.
Declaration
class FSFileNameOverview
FSFileName is the class that carries filenames from the kernel to FSModule instances, and carries names back to the kernel as part of directory enumeration.
A filename is usually a valid UTF-8 sequence, but can be an arbitrary byte sequence that doesn’t conform to that format. As a result, the data property always contains a value, but the string property may be empty. An FSModule can receive an FSFileName that isn’t valid UTF-8 in two cases:
A program passes erroneous data to a system call. The
FSModuletreats this situation as an error.An
FSModulelacks the character encoding used for a file name. This situation occurs because some file system formats consider a filename to be an arbitrary “bag of bytes,” and leave character encoding up to the operating system. Without encoding information, theFSModulecan only pass back the names it finds on disk. In this case, the behavior of upper layers such as FileManager is unspecified. However, theFSModulemust support looking up such names and using them as the source name of rename operations. TheFSModulemust also be able to support filenames that are derivatives of filenames returned from directory enumeration. Derivative filenames include Apple Double filenames ("._Name"), and editor backup filenames.