SLAS

File Attributes

From LabAutopedia

Jump to: navigation, search
Invited-icon.jpgA LabAutopedia invited article


Authored by: Mark F. Russo

Files are associated with various attributes that are given to them by the operating system. Most operating systems keep track of a file’s name, creation date, date of last update and size. Other attributes may be stored, such as whether a file is hidden, read-only, write-only, executable, locked or unlocked, etc.

The type of a file is also an attribute associated with the file. Windows uses the three or four characters following the final dot (.) in the file name for this purpose, called the file extension. The Macintosh operating system stores this information separately.

File attributes are used for many purposes. For example, file type is used to suggest a particular application with which to open a given file. Also, a file’s archive attribute indicates whether or not a file has been changed since it was last backed up. This tells a backup utility whether or not to back up a given file. After a successful backup, the archive attribute is turned off, only to be turned back on when the file is modified again. A locked file may be cause a failure when attempting to open a file. A thorough understanding of file attributes implemented by an operating system can go a long way toward explaining certain operating system behaviors.