Computer folder
   HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, a directory is a file system cataloging structure which contains references to other
computer file A computer file is a computer resource for recording data in a computer storage device, primarily identified by its file name. Just as words can be written to paper, so can data be written to a computer file. Files can be shared with and trans ...
s, and possibly other directories. On many computers, directories are known as folders, or drawers,
analogous Analogy (from Greek ''analogia'', "proportion", from ''ana-'' "upon, according to" lso "against", "anew"+ ''logos'' "ratio" lso "word, speech, reckoning" is a cognitive process of transferring information or meaning from a particular subject ...
to a
workbench A workbench is a sturdy table at which manual work is done. They range from simple flat surfaces to very complex designs that may be considered tools in themselves. Workbenches vary in size from tiny jewellers benches to the huge benches used by ...
or the traditional office
filing cabinet A filing cabinet (or sometimes file cabinet in American English) is a piece of office furniture for storing paper documents in file folders. In the most simple context, it is an enclosure for drawers in which items are stored. The two most comm ...
. The name derives from books like a
telephone directory A telephone directory, commonly called a telephone book, telephone address book, phonebook, or the white and yellow pages, is a listing of telephone subscribers in a geographical area or subscribers to services provided by the organization that ...
that lists the phone numbers of all the people living in a certain area. Files are organized by storing related files in the same directory. In a hierarchical file system (that is, one in which files and directories are organized in a manner that resembles a
tree In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
), a directory contained inside another directory is called a subdirectory. The terms parent and child are often used to describe the relationship between a subdirectory and the directory in which it is cataloged, the latter being the parent. The top-most directory in such a filesystem, which does not have a parent of its own, is called the root directory.


Overview

Historically, and even on some modern
embedded system An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' ...
s, the file systems either had no support for directories at all or had only a "flat"
directory structure In computing, a directory structure is the way an operating system arranges files that are accessible to the user. Files are typically displayed in a hierarchical tree structure. File names and extensions A filename is a string used to uniquely ...
, meaning subdirectories were not supported; there were 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 A path is a route for physical travel – see Trail. Path or PATH may also refer to: Physical paths of different types * Bicycle path * Bridle path, used by people on horseback * Course (navigation), the intended path of a vehicle * Desire p ...
. In many
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
s, programs have an associated
working directory In computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with each process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just c ...
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 In computing, the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor. In some cases, the actual name of th ...
, but modern Unix usually uses another directory such as for this purpose. In keeping with
Unix philosophy The Unix philosophy, originated by Ken Thompson, is a set of cultural norms and philosophical approaches to minimalist, modular software development. It is based on the experience of leading developers of the Unix operating system. Early Unix de ...
, 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 call In computing, a system call (commonly abbreviated to syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, acc ...
s that return records, not a byte-stream.


Folder metaphor

The name ''folder'', presenting an analogy to the
file folder A file folder (or simply folder) is a kind of folder that holds papers and money together for organization and protection. File folders usually consist of a sheet of heavy paper stock or other thin, but stiff, material which is folded in hal ...
used in offices, and used in a hierarchical file system design for the
Electronic Recording Machine, Accounting ERMA (Electronic Recording Machine, Accounting) was a computer technology that automated bank bookkeeping and check processing. Developed at the nonprofit research institution SRI International under contract from Bank of America, the project be ...
(ERMA) Mark 1 published in 1958 as well as by
Xerox Star The Xerox Star workstation, officially named Xerox 8010 Information System, is the first commercial personal computer to incorporate technologies that have since become standard in personal computers, including a bitmapped display, a window-based ...
, is used in almost all modern
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
s' desktop environments. Folders are often depicted with
icon An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, and Catholic churches. They are not simply artworks; "an icon is a sacred image used in religious devotion". The most ...
s which visually resemble physical file folders. There is a difference between a ''directory'', which is a file system concept, and the
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inst ...
metaphor that is used to represent it (a ''folder''). For example, Microsoft Windows uses the concept of
special folders On Microsoft Windows, a special folder is a folder that is presented to the user through an interface as an abstract concept instead of an absolute folder path. (The synonymous term shell folder is sometimes used instead.) Special folders make ...
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 folder In computing, a virtual folder generally denotes an organizing principle for files that is not dependent on location in a hierarchical directory tree. Instead, it consists of software that coalesces results from a data store, which may be a databa ...
s 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 client An email client, email reader or, more formally, message user agent (MUA) or mail user agent is a computer program used to access and manage a user's email. A web application which provides message management, composition, and reception functio ...
s 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 A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
console Console may refer to: Computing and video games * System console, a physical device to operate a computer ** Virtual console, a user interface for multiple computer consoles on one device ** Command-line interface, a method of interacting with ...
, but if accessed through a graphical
file manager A file manager or file browser is a computer program that provides a user interface to manage files and folders. The most common operations performed on files or groups of files include creating, opening (e.g. viewing, playing, editing or pr ...
, users may sometimes call it a folder.


Lookup cache

Operating systems that support hierarchical filesystems (practically all modern ones) implement a form of caching to
RAM Ram, ram, or RAM may refer to: Animals * A male sheep * Ram cichlid, a freshwater tropical fish People * Ram (given name) * Ram (surname) * Ram (director) (Ramsubramaniam), an Indian Tamil film director * RAM (musician) (born 1974), Dutch * ...
of recent
path A path is a route for physical travel – see Trail. Path or PATH may also refer to: Physical paths of different types * Bicycle path * Bridle path, used by people on horseback * Course (navigation), the intended path of a vehicle * Desire p ...
lookups. In the
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
world, this is usually called Directory Name Lookup Cache (DNLC), although it is called dcache on
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
. For local filesystems, DNLC entries normally expire only under pressure from other more recent entries. For
network file system Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems (Sun) in 1984, allowing a user on a client computer to access files over a computer network much like local storage is accessed. NFS, lik ...
s a coherence mechanism is necessary to ensure that entries have not been invalidated by other clients.


See also

*
File folder A file folder (or simply folder) is a kind of folder that holds papers and money together for organization and protection. File folders usually consist of a sheet of heavy paper stock or other thin, but stiff, material which is folded in hal ...
;Concepts *
Directory structure In computing, a directory structure is the way an operating system arranges files that are accessible to the user. Files are typically displayed in a hierarchical tree structure. File names and extensions A filename is a string used to uniquely ...
* Filename * Filesystem Hierarchy Standard * Home directory * Root directory *
Virtual folder In computing, a virtual folder generally denotes an organizing principle for files that is not dependent on location in a hierarchical directory tree. Instead, it consists of software that coalesces results from a data store, which may be a databa ...
*
Working directory In computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with each process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just c ...
;Commands *
cd (command) The command, also known as (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files. Implementations The command has bee ...
*
chroot A chroot on Unix and Unix-like operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normall ...
*
dir (command) In computing, dir (directory) is a command in various computer operating systems used for computer file and directory listing. It is one of the basic commands to help navigate the file system. The command is usually implemented as an internal ...
*
mkdir The mkdir (make directory) command in the Unix, DOS, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory. It is also available in the EFI shell and in the PHP scripting language. In DOS, OS/2, ...
*
pushd and popd In computing, pushd and popd are commands used to work with the command line directory stack. They are available on command-line interpreters such as 4DOS, Bash, C shell, tcsh, Hamilton C shell, KornShell, cmd.exe, and PowerShell for op ...
*
pwd In Unix-like and some other operating systems, the pwd command (''print working directory'') writes the full pathname of the current working directory to the standard output. Implementations Multics had a pwd command (which was a short name of ...
* tree (command)


References


External links


Definition of directory
by The Linux Information Project (LINFO) {{DEFAULTSORT:Directory (computing) Computer file systems File system management