27 Input/output library [input.output]

27.10 File systems [filesystems]

27.10.4 Terms and definitions [fs.definitions]

27.10.4.1 absolute path [fs.def.absolute.path]

A path that unambiguously identifies the location of a file without reference to an additional starting location. The elements of a path that determine if it is absolute are operating system dependent.

27.10.4.2 canonical path [fs.def.canonical.path]

An absolute path that has no elements that are symbolic links, and no dot or dot-dot elements ([path.generic]).

27.10.4.3 directory [fs.def.directory]

A file within a file system that acts as a container of directory entries that contain information about other files, possibly including other directory files.

27.10.4.4 file [fs.def.file]

An object within a file system that holds user or system data. Files can be written to, or read from, or both. A file has certain attributes, including type. File types include regular files and directories. Other types of files, such as symbolic links ([fs.def.symlink]), may be supported by the implementation.

27.10.4.5 file system [fs.def.filesystem]

A collection of files and certain of their attributes.

27.10.4.6 file system race [fs.def.race]

The condition that occurs when multiple threads, processes, or computers interleave access and modification of the same object within a file system.

27.10.4.7 filename [fs.def.filename]

The name of a file. Filenames dot and dot-dot have special meaning. The following characteristics of filenames are operating system dependent:

  • The permitted characters. [ Example: Some operating systems prohibit the ASCII control characters (0x00 – 0x1F) in filenames.  — end example ]

  • The maximum permitted length.

  • Filenames that are not permitted.

  • Filenames that have special meaning.

  • Case awareness and sensitivity during path resolution.

  • Special rules that may apply to file types other than regular files, such as directories.

27.10.4.10 native encoding [fs.def.native.encode]

For narrow character strings, the operating system dependent current encoding for pathnames ([fs.def.pathname]). For wide character strings, the implementation defined execution wide-character set encoding ([lex.charset]).

27.10.4.11 native pathname format [fs.def.native]

The operating system dependent pathname format accepted by the host operating system.

27.10.4.12 normal form [fs.def.normal.form]

A path with no redundant current directory (dot) elements, no redundant parent directory (dot-dot) elements, and no redundant directory-separators. The normal form for an empty path is an empty path. The normal form for a path ending in a directory-separator that is not the root directory has a current directory (dot) element appended. A path in normal form is said to be normalized. The process of obtaining a normalized path from a path that is not in normal form is called normalization. [ Note: The rule that appends a current directory (dot) element supports operating systems like OpenVMS that use different syntax for directory names and regular file names.  — end note ]

27.10.4.13 operating system dependent behavior [fs.def.osdep]

Behavior that is dependent upon the behavior and characteristics of an operating system. See [fs.conform.os].

27.10.4.14 parent directory [fs.def.parent]

⟨of a directory⟩ the directory that both contains a directory entry for the given directory and is represented by the filename dot-dot in the given directory.

27.10.4.15 parent directory [fs.def.parent.other]

⟨of other types of files⟩ a directory containing a directory entry for the file under discussion.

27.10.4.16 path [fs.def.path]

A sequence of elements that identify the location of a file within a filesystem. The elements are the root-nameopt, root-directoryopt, and an optional sequence of filenames. The maximum number of elements in the sequence is operating system dependent.

27.10.4.17 pathname [fs.def.pathname]

A character string that represents the name of a path. Pathnames are formatted according to the generic pathname format grammar ([path.generic]) or an operating system dependent native pathname format.

27.10.4.18 pathname resolution [fs.def.pathres]

Pathname resolution is the operating system dependent mechanism for resolving a pathname to a particular file in a file hierarchy. There may be multiple pathnames that resolve to the same file. [ Example: POSIX specifies the mechanism in section 4.11, Pathname resolution.  — end example ]

27.10.4.19 relative path [fs.def.relative-path]

A path that is not absolute, and as such, only unambiguously identifies the location of a file when resolved ([fs.def.pathres]) relative to an implied starting location. The elements of a path that determine if it is relative are operating system dependent. [ Note: Pathnames “.” and “..” are relative paths.  — end note ]