midrange.com code scratchpad
Name:
MKDIR Api example.
Scriptlanguage:
Plain Text
Tabwidth:
4
Date:
12/30/2019 07:10:17 pm
IP:
Logged
Description:
Example of MKDIR API behavior for me.
Code:
  1. Parent folder:
  2. Object . . . . . . . . . . . . :   /kevin/mkdirtest   
  3. Type . . . . . . . . . . . . . :   DIR                
  4. Owner  . . . . . . . . . . . . :   KEVIN              
  5. Primary group  . . . . . . . . :   *NONE              
  6. Authorization list . . . . . . :   *NONE              
  7.                                                       
  8. Type options, press Enter.                            
  9.   1=Add user   2=Change user authority   4=Remove user
  10.                                                       
  11.                    Data     --Object Authorities--    
  12. Opt  User        Authority  Exist  Mgt  Alter  Ref    
  13.                                                       
  14.      *PUBLIC     *RX                X           X     
  15.      KEVIN       *RWX         X     X     X     X     
  16.  
  17. Bottom after F11
  18.                    Data     -------------Data Authorities-------------
  19. Opt  User        Authority  Objopr  Read  Add  Update  Delete  Execute
  20.                                                                       
  21.      *PUBLIC     *RX          X      X                            X   
  22.      KEVIN       *RWX         X      X     X     X       X        X   
  23.  
  24. Sample program. IFSIO_H is Scott Klement's copybook for IFS Functions.
  25.  
  26. **Free                                            
  27.    /copy qrpgsrc,ifsio_h                          
  28.                                                   
  29.    Dcl-S Mode Uns(10);                            
  30.    Dcl-S Path Char(70);                           
  31.                                                   
  32.    Mode = S_Ixusr   // My user profile - *X only  
  33.       + S_Iroth + S_Iwoth;  // Other (*PUBLIC) *RW
  34.    Path = '/kevin/mkdirtest/newfolder' + x'00';   
  35.    Mkdir(%Addr(Path):Mode);                       
  36.    *Inlr = *On;                                   
  37.    Return;                                        
  38.  
  39. The new folder authorities.
  40. Object . . . . . . . . . . . . :   /kevin/mkdirtest/newfolder
  41. Type . . . . . . . . . . . . . :   DIR                       
  42. Owner  . . . . . . . . . . . . :   KEVIN                     
  43. Primary group  . . . . . . . . :   *NONE                     
  44. Authorization list . . . . . . :   *NONE                     
  45.                                                              
  46. Type options, press Enter.                                   
  47.   1=Add user   2=Change user authority   4=Remove user       
  48.                                                              
  49.                    Data     --Object Authorities--           
  50. Opt  User        Authority  Exist  Mgt  Alter  Ref           
  51.                                                              
  52.      *PUBLIC     *RW                X           X            
  53.      KEVIN       *X           X     X     X     X            
  54.  
  55. After F11
  56.                    Data     -------------Data Authorities-------------
  57. Opt  User        Authority  Objopr  Read  Add  Update  Delete  Execute
  58.                                                                       
  59.      *PUBLIC     *RW          X      X     X     X       X            
  60.      KEVIN       *X           X                                   X   
© 2004-2019 by midrange.com generated in 0.006s valid xhtml & css