ed so it appears in two directories. Historically, and even on some modern
embedded systems, the file systems either had no support for directories at all or had only a "flat"
directory structure, meaning subdirectories were not supported; there was only a group of top-level directories, each containing files. In modern systems, a directory can contain a mix of files and subdirectories. A reference to a location in a directory system is called a
path. In many
operating systems, programs have an associated
working directory in which they execute. Typically, file names accessed by the program are assumed to reside within this directory if the file names are not specified with an explicit directory name. Some operating systems restrict a
user's access only to their
home directory or project directory, thus isolating their activities from all other users. In early versions of Unix, the root directory was the home directory of the
root user, but modern Unix usually uses another directory such as for this purpose. In keeping with
Unix philosophy, Unix systems treat directories as a type of file. Caveats include not being able to write to a directory file except indirectly by creating, renaming, and removing file system objects in the directory and only being able to read from a directory file using directory-specific library routines and
system calls that return records, not a byte-stream.
Folder metaphor ). The name
folder, presenting an analogy to the
file folder used in offices, and used in a hierarchical file system design for the
Electronic Recording Machine, Accounting (ERMA) Mark 1 published in 1958 as well as by
Xerox Star, is used in almost all modern
operating systems' desktop environments. Folders are often depicted with
icons that visually resemble physical file folders. There is a difference between a
directory, which is a
file system concept, and the
graphical user interface metaphor that is used to represent it (a
folder). For example,
Microsoft Windows uses the concept of
special folders to help present the contents of the computer to the user in a fairly consistent way that frees the user from having to deal with absolute directory paths, which can vary between versions of Windows, and between individual installations. Many operating systems also have the concept of "smart folders" or
virtual folders that reflect the results of a file system search or other operation. These folders do not represent a directory in the file hierarchy. Many
email clients allow the creation of folders to organize email. These folders have no corresponding representation in the filesystem structure. If one is referring to a
container of documents, the term
folder is more appropriate. The term
directory refers to the way a structured list of document files and folders are stored on the computer. The distinction can be due to the way a directory is accessed; on Unix systems, is usually referred to as a directory when viewed in a
command line console, but if accessed through a graphical
file manager, users may sometimes call it a folder. == Lookup cache ==