Node: ChMod Intrinsic (function), Next: , Previous: ChDir Intrinsic (function), Up: Other Intrinsics



ChMod Intrinsic (function)

     ChMod(Name, Mode)
     

ChMod: INTEGER(KIND=1) function.

Name: CHARACTER; scalar; INTENT(IN).

Mode: CHARACTER; scalar; INTENT(IN).

Intrinsic groups: badu77.

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.

Returns 0 on success or a non-zero error code otherwise.

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.

Due to the side effects performed by this intrinsic, the function form is not recommended.

For information on other intrinsics with the same name: See ChMod Intrinsic (subroutine).