DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦453c3d549⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Posix_Files, seg_0213e9

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Posix, Posix_Permissions, Posix_Process_Identification, Calendar;

package Posix_Files is

    -- Operations to create files in the file system

    procedure Create_File (Filename : in Posix.Posix_String;
                           Permission : in Posix_Permissions.Permission_Set);

    procedure Create_Directory
                 (Directory_Name : in Posix.Posix_String;
                  Permission : in Posix_Permissions.Permission_Set);

    procedure Create_Fifo_Special_File
                 (Filename : in Posix.Posix_String;
                  Permission : in Posix_Permissions.Permission_Set);


    -- Operations to remove files from the file system

    procedure Unlink (Filename : in Posix.Posix_String);

    procedure Remove_Directory (Filename : in Posix.Posix_String);


    -- Predicates on files in the file system

    function Is_File (Filename : Posix.Posix_String) return Boolean;

    function Is_Directory (Filename : Posix.Posix_String) return Boolean;

    function Is_Fifo_Special_File
                (Filename : Posix.Posix_String) return Boolean;


    -- Operations to modify file pathnames

    procedure Link (Filename : in Posix.Posix_String;
                    New_Filename : in Posix.Posix_String);

    procedure Rename (Filename : in Posix.Posix_String;
                      New_Filename : in Posix.Posix_String);


    -- Operation to iterate over files in a directory

    generic
        with procedure Action (Pathname : in Posix.Posix_String;
                               Quit : in out Boolean);
    procedure For_Every_Directory_Entry (Dir : in Posix.Posix_String);


    -- Operations to update file status information

    procedure Change_Owner_And_Group
                 (Filename : in Posix.Posix_String;
                  Owner : in Posix_Process_Identification.User_Id;
                  Group : in Posix_Process_Identification.Group_Id);

    procedure Change_Permissions
                 (Filename : in Posix.Posix_String;
                  Permission : in Posix_Permissions.Permission_Set);

    type File_Times_Record is
        record
            Access_Time : Calendar.Time;
            Modification_Time : Calendar.Time;
        end record;

    -- IMPORTANT NOTE : Due to the limits on the magnitude of a 32 bit
    -- integer (i.e. -2**31 .. 2**31-1), the range of times that can be
    -- specified for the time of a file is limited. More specifically, the
    -- time should lie between 01:45:52, December 15, 1901 and 03:14:07,
    -- January 17, 2038. Using times outside these limits may produce
    -- unintended results (exceptions or wraparound dates). Staying within
    -- the limits above will produce correct results in any time zone.
    --
    -- ALSO NOTE : The time set for the file is always local time.

    procedure Set_File_Times (Filename : in Posix.Posix_String;
                              Time : in File_Times_Record);

    procedure Set_File_Times_To_Current_Time (Filename : in Posix.Posix_String);


    -- Operations to determine file accessibility

    type Access_Modes is (Read_Ok, Write_Ok, Execute_Ok, File_Exists);
    type Access_Mode_Set is array (Access_Modes) of Boolean;

    -- In the two routines below, specifying FALSE for any of the access modes
    -- means that you don't care about that permission, not that you want to
    -- check if it is OFF. For example, if you call function ACCESSIBLE with
    -- all of the ACCESS_MODES FALSE, the returned value will always be TRUE,
    -- regardless of whether the file exists or what its permissions are. If
    -- you wish to verify that a particular permission is OFF, check to see
    -- if it is ON and then take the opposite of the returned value.

    function Accessible (Filename : in Posix.Posix_String;
                         Permissions : in Access_Mode_Set) return Boolean;

    procedure Accessible (Filename : in Posix.Posix_String;
                          Permissions : in Access_Mode_Set);

end Posix_Files;

E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=1f rec1=00 rec2=01 rec3=05a
        [0x01] rec0=1e rec1=00 rec2=02 rec3=016
        [0x02] rec0=15 rec1=00 rec2=03 rec3=03e
        [0x03] rec0=15 rec1=00 rec2=04 rec3=012
        [0x04] rec0=04 rec1=00 rec2=05 rec3=000
    tail 0x2171d6380838d73a201be 0x42a00088462060003