]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/compiler-characteristics/file-operations-on-symbolic-links.rst
c0d1e10bbf830546c6ec930f1b561e407f5dcbac
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / compiler-characteristics / file-operations-on-symbolic-links.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. index:: file, symbolic link
7
8 .. _file-operations-on-symbolic-links:
9
10 File operations on symbolic links
11 *********************************
12
13 This section documents the behavior of GNU Fortran for file operations on
14 symbolic links, on systems that support them.
15
16 * Results of INQUIRE statements of the 'inquire by file' form will
17 relate to the target of the symbolic link. For example,
18 ``INQUIRE(FILE="foo",EXIST=ex)`` will set :samp:`{ex}` to :samp:`{.true.}` if
19 :samp:`{foo}` is a symbolic link pointing to an existing file, and :samp:`{.false.}`
20 if :samp:`{foo}` points to an non-existing file ('dangling' symbolic link).
21
22 * Using the ``OPEN`` statement with a ``STATUS="NEW"`` specifier
23 on a symbolic link will result in an error condition, whether the symbolic
24 link points to an existing target or is dangling.
25
26 * If a symbolic link was connected, using the ``CLOSE`` statement
27 with a ``STATUS="DELETE"`` specifier will cause the symbolic link itself
28 to be deleted, not its target.