CurrentFileAttributes Property

Returns the attributes of the current file.

Syntax

NSFile.CurrentFileAttributes

Return Values

The following numbers are valid and may be combined for multiple attributes. For example, a file can be read-only and hidden and would have the numeric value of 3.

Value Description (HRESULT)
0 The file or directory has no other attributes set. This attribute is valid only if used alone.
1 The file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it.
2 The file or directory is hidden. It is not included in an ordinary directory listing.
4 The file or directory is part of, or is used exclusively by, the operating system.
16 The "file or directory" is a directory.
32 The file or directory is an archive file or directory. Applications use this flag to mark files for backup or removal.
256 The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.
2048 The file or directory is compressed. For a file, this means that all of the data in the file is compressed. For a directory, this means that compression is the default for newly created files and subdirectories.
4096 The data of the file is not immediately available. Indicates that the file data has been physically moved to offline storage.

© 1996-1998 Microsoft Corporation. All rights reserved.