A computer file is a segment of bits, themselves nearly always grouped into eight-bit bytes, associated with a textual name. Notwithstanding any underlying implementation constraints, both the contents and the names of files are arbitrary, mutually independent and semantically opaque. That is:
Files conceptually reside in a nested hierarchy of directories, themselves usually implemented as special files whose contents consist of a specially-formatted dictionary of the names of other files and directories, connected to further clues to their physical location on the storage medium. Files and directories, potentially along with other, similar types of special file, persist on top of a file system, which is the most popular (but by no means the only) general-purpose method of permanently storing digital information.