Node: ChMod Intrinsic (subroutine), Next: CLog Intrinsic, Previous: ChDir Intrinsic (subroutine), Up: Table of Intrinsic Functions
CALL ChMod(Name, Mode, Status)
Name: CHARACTER
; scalar; INTENT(IN).
Mode: CHARACTER
; scalar; INTENT(IN).
Status: INTEGER(KIND=1)
; OPTIONAL; scalar; INTENT(OUT).
Intrinsic groups: unix
.
Description:
Changes the access mode of file Name according to the
specification Mode, which is given in the format of
chmod(1)
.
A null character (CHAR(0)
) marks the end of
the name in Name--otherwise,
trailing blanks in Name are ignored.
Currently, Name must not contain the single quote
character.
If the Status argument is supplied, it contains 0 on success or a nonzero error code upon return.
Note that this currently works
by actually invoking /bin/chmod
(or the chmod
found when
the library was configured) and so might fail in some circumstances and
will, anyway, be slow.
Some non-GNU implementations of Fortran provide this intrinsic as only a function, not as a subroutine, or do not support the (optional) Status argument.
For information on other intrinsics with the same name: See ChMod Intrinsic (function).