The CfsError class provides a common mechanism for obtaining error information pertaining to file system operations. If an error prevents the successful completion of a Common File System operation, the affected method will answer an instance of
CfsError, rather than its normal return value. The
CfsError instance contains information pertaining to the cause of the error.
Errors are detected by sending the isCfsError message to the result returned by any low-level file system operation,
CfsStat operation, or file stream class method such as
open: or
openEmpty:. Instances of
CfsError are the only objects that answer
true to this message, all other objects answer
false.
When testing for a specific error, compare the CfsError instance's
errno against the error constants in the
CfsConstants pool dictionary. All application code and documentation should refer to errors by identifier, for example,
ENOENT, rather than by number, because error constant values can vary from platform to platform.