Device and Directory Information Routines

You can retrieve information about devices, directories, and files with the functions listed below. File names can be long file names or UNC file names. A forward slash in a path name is treated as a backslash. All path names can contain drive specifications.

Portability Routine Description
CHDIR Changes the current working directory
FSTAT Returns information about a logical file unit
GETCWD Returns the current working directory path name
RENAME Renames a file
STAT, LSTAT Returns information about a named file
UNLINK Removes a directory entry from the path

Standard Fortran 90 provides the INQUIRE statement, which returns detailed file information either by file name or unit number. Use INQUIRE as an equivalent to FSTAT, LSTAT or STAT. LSTAT and STAT return the same information; STAT is the preferred function.