[UP]


Manual Reference Pages  - system_mkdir (3)

NAME

system_mkdir(3f) - [M_system:FILE_SYSTEM] call mkdir(3c) to create a new directory (LICENSE:PD)

CONTENTS

Synopsis
Description
Example
Author
License

SYNOPSIS

DESCRIPTION

Predefined variables are typically used to set permission modes. You can bytewise-OR together these variables to create the most common permissions mode:

    User:    R_USR  (read),  W_USR  (write),  X_USR(execute)
    Group:   R_GRP  (read),  W_GRP  (write),  X_GRP(execute)
    Others:  R_OTH  (read),  W_OTH  (write),  X_OTH(execute)

Additionally, some shortcuts are provided (basically a bitwise-OR combination of the above):

     Read + Write + Execute: RWX_U (User), RWX_G (Group), RWX_O (Others)
     DEFFILEMODE: Equivalent of 0666 =rw-rw-rw-
     ACCESSPERMS: Equivalent of 0777 = rwxrwxrwx

Therefore, to give only the user rwx (read+write+execute) rights whereas group members and others may not do anything, you can use any of the following mkdir() calls equivalently:

     ierr= mkdir("mydir", IANY([R_USR, W_USR, X_USR]));
     ierr= mkdir("mydir", RWX_U);

In order to give anyone any rights (mode 0777 = rwxrwxrwx), you can use any of the following calls equivalently:

     ierr= mkdir("mydir",IANY([R_USR,W_USR,X_USR,R_GRP,W_GRP,X_GRP,R_OTH,W_OTH,X_OTH]));
     ierr= mkdir("mydir",IANY([RWX_U,RWX_G,RWX_O]));
     ierr= mkdir("mydir",ACCESSPERMS);

EXAMPLE

Sample program:

   program demo_system_mkdir
   use M_system, only : system_perror
   use M_system, only : system_mkdir
   use M_system, only : R_GRP,R_OTH,R_USR,RWX_G,RWX_O
   use M_system, only : RWX_U,W_GRP,W_OTH,W_USR,X_GRP,X_OTH,X_USR
   use M_system, only : DEFFILEMODE, ACCESSPERMS
   implicit none
   integer :: ierr
   ierr=system_mkdir(’_scratch’,IANY([R_USR,W_USR,X_USR]))
   end program demo_system_mkdir

AUTHOR

John S. Urban

LICENSE

Public Domain


system_mkdir (3) March 11, 2021
Generated by manServer 1.08 from 928f5db6-28a6-40c6-86a6-f8742dd70fd5 using man macros.