Directory

Share

What is a Directory?

A directory is a thing that lists or indexes other things. Typically, this term refers to a directory in a file system, which is also called a folder. This folder is a virtual object that contains files inside of it. When viewed with a file manager, the file manager displays the list of files within the folder. Similarly, the idea here is that the directory of files is a thing that lists files, it just happens that those files are also said to be "inside" of the directory.

In a filepath, items inside a directory are connected to the directory by a path separator: the backward slash (\) in Windows, and the forward slash (/) in Linux. For example, C:\photos\flower.jpg is a file with the filename flower.jpg inside a photos directory (the C:\ is a special directory-like code, called the drive letter in Windows). Similarly: /photos/flower.jpg is the same thing but it's a Linux filepath.

Another type of directory is a directory of links, a link directory. This is a a type of website whose purpose is to simply contain links to various other websites. Although they used to be common in the past, nowadays they've been generally replaced by search engines.

There are also directories of more specific things. For example, a directory of artists would be a website or webpage whose main purpose is to list artists. A directory of applications would be the same thing, but for applications.

Normally, however, "application directory" means the folder where an application was installed in your computer.

Although URLs aren't exactly file systems, it's common to find directories in URLs, at least as a concept. For example, a website that contains information about movies and books could have URLS such as https://www.example.com/movies/harry-potter, and we would say this movies part is a directory, and if the path was /books/harry-potter instead, then it would be the books directory.

In programming, the "current directory" refers to the directory in a file system used to resolve relative filepaths. For example, if I told a program to open flower.jpg, and the current directory is C:\photos\, the program would try to open C:\photos\flower.jpg. In a terminal, the current directory can be changed with the command cd (short for chdir, which is short for "change directory").

Observations

It seems that the term directory comes from giving directions, and they existed as books and telephone number directories before computers.

serving to direct
specifically : providing advisory but not compulsory guidance

https://www.merriam-webster.com/dictionary/directory (accessed 2024-06-19)

Comments

Leave a Reply

Leave your thoughts! Required fields are marked *