------------------------------------------------------------------------ -- These package specifications were extracted from IEEE Std 1003.5-1992, -- IEEE Standard for Information Technology--POSIX Ada Language -- Interfaces--Part 1: Binding System Application Program Interface, -- copyright (c)1992 by the Institute of Electrical and Electronics -- Engineers, Inc. These package specifications represent only a portion -- of the document and are not to be interpreteted as the approved -- consensus standard. The IEEE Std 1003.5-1992 must be used in -- conjunction with these package specifications in order to claim -- conformance. The IEEE takes no responsibility for and will assume no -- liability for damages resulting from the reader's misinpretation of -- said information resulting from its out of context nature. To order -- copies of the IEEE Std 1003.5-1992, please contact the IEEE Service -- Center at 445 Hoes Lane, PO Box 1331, Piscataway, NJ 08855-1331; via -- phone at 1-800-678-IEEE, 908-981-1393; or via fax at 908-981-9667. ------------------------------------------------------------------------ with POSIX, POSIX_Calendar, POSIX_Permissions, POSIX_Process_Identification; package POSIX_Files is -- Operations to Create Files in the File System procedure Create_Directory (Pathname : in POSIX.Pathname; Permission : in POSIX_Permissions.Permission_Set); procedure Create_FIFO (Pathname : in POSIX.Pathname; Permission : in POSIX_Permissions.Permission_Set); -- Operations to remove files from the File System procedure Unlink (Pathname : in POSIX.Pathname); procedure Remove_Directory (Pathname : in POSIX.Pathname); -- Predicates on files in the File System function Is_File (Pathname : POSIX.Pathname) return Boolean; function Is_Directory (Pathname : POSIX.Pathname) return Boolean; function Is_FIFO (Pathname : POSIX.Pathname) return Boolean; function Is_Character_Special_File (Pathname : POSIX.Pathname) return Boolean; function Is_Block_Special_File (Pathname : POSIX.Pathname) return Boolean; -- Operations to modify File Pathnames procedure Link (Old_Pathname : in POSIX.Pathname; New_Pathname : in POSIX.Pathname); procedure Rename (Old_Pathname : in POSIX.Pathname; New_Pathname : in POSIX.Pathname); -- Iterating over files within a directory type Directory_Entry is limited private; function Filename_Of (D_Entry : Directory_Entry) return POSIX.Filename; generic with procedure Action (D_Entry : in Directory_Entry; Quit : in out Boolean); procedure For_Every_Directory_Entry (Pathname : in POSIX.Pathname); -- Operations to Update File Status Information procedure Change_Owner_And_Group (Pathname : in POSIX.Pathname; Owner : in POSIX_Process_Identification.User_ID; Group : in POSIX_Process_Identification.Group_ID); procedure Change_Permissions (Pathname : in POSIX.Pathname; Permission : in POSIX_Permissions.Permission_Set); procedure Set_File_Times (Pathname : in POSIX.Pathname; Access_Time : in POSIX_Calendar.Time; Modification_Time : in POSIX_Calendar.Time); procedure Set_File_Times (Pathname : in POSIX.Pathname); -- Operations to Determine File Accessibility type Access_Mode is (Read_Ok, Write_Ok, Execute_Ok); type Access_Mode_Set is array (Access_Mode) of Boolean; function Is_Accessible (Pathname : POSIX.Pathname; Access_Modes : Access_Mode_Set) return Boolean; function Accessibility (Pathname : POSIX.Pathname; Access_Modes : Access_Mode_Set) return POSIX.Error_Code; function Is_File_Present (Pathname : POSIX.Pathname) return Boolean; function Existence (Pathname : POSIX.Pathname) return POSIX.Error_Code; private type Directory_Entry is @p; end POSIX_Files;