Data and programs are stored in units called files on secondary-storage media as hard disks, floppy diskettes, and compact disks (CDs). A file is named and is referred to by its name. This way the application software is shielded from such details as where file data are stored and how secondary-storage devices actually work. The operating system provides facilities to create, read, write, rename, copy, and delete files. In addition to name, each file has attributes as type, size, date and time of creation, owner’s name, and others. A folder is a container for files. Each folder has a directory specifying the files stored in it. The directory contains an entry for each stored file and that entry specifies the file name, attributes, and storage location. When a file is needed, the operating system searches its directories until it finds the name of that file. The operating system then extracts the file attributes and storage location and put this information in memory. All subsequent references to the file use the information in memory. |