5.8 File operations on symbolic links

  • Results of INQUIRE statements of the “inquire by file” form will relate to the target of the symbolic link. For example, INQUIRE(FILE="foo",EXIST=ex) will set ex to .true. if foo is a symbolic link pointing to an existing file, and .false. if foo points to an non-existing file (“dangling” symbolic link).
  • Using the OPEN statement with a STATUS="NEW" specifier on a symbolic link will result in an error condition, whether the symbolic link points to an existing target or is dangling.
  • If a symbolic link was connected, using the CLOSE statement with a STATUS="DELETE" specifier will cause the symbolic link itself to be deleted, not its target.

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gfortran/File-operations-on-symbolic-links.html