File

Share

What is a File in the Computer?

A "file" is a general term for documents, photos, videos, music, and other virtual objects that can be saved in a computer. For example, when we say "an image file" we are talking about a photo or drawing saved in your computer.

Each file has a name (the filename), and may be contained inside a folder (also called a directory). This folder will also have a name, and may be contained inside another folder. Each file has an unique identifier called its path, which is formed by its filename, plus the filenames of all the folders it's inside of, e.g. /first-folder/second-folder/file.jpg is a valid path for a file in Linux (but not in Windows).

Generally, you files are saved in a hard disk (HDD) or SSD. They can also be saved to an USB stick to be moved from one computer to another. These devices where files can be saved are called mass storage devices.

More technically, a computer file is an entry in a file system, such as NTFS, FAT or EXT4. These file systems are created by partitioning and formatting a mass storage device. For example, a 500 GB SSD could have two partitions: one 400 GB partition formatted as a NTFS file system, and one 100 GB partition formatted with an EXT4 file system.

Each file has an unique path within its file system so it can be uniquely identified. On Windows, each partition gets its own letter identifier. For example, C:\plants\flower.jpg is a valid path in Windows, that says there's a file called flower.jpg in a folder called plants in the C: partition.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *