|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package File_Names, seg_04b931
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with A_Strings; use A_Strings; package File_Names is type Rights_Kinds is (World_Execute_R, World_Write_R, World_Read_R, Group_Execute_R, Group_Write_R, Group_Read_R, Owner_Execute_R, Owner_Write_R, Owner_Read_R, Keep_In_Memory_R, Execute_As_Group_R, Execute_As_User_R); Allow_Right : constant Boolean := True; Deny_Right : constant Boolean := False; Check_Right : constant Boolean := True; -- use to build rights vectors type Permission_Vector is array (Rights_Kinds range <>) of Boolean; pragma Pack (Permission_Vector); for Permission_Vector'Size use 16; subtype Permission is Permission_Vector (Rights_Kinds); All_Rights_Allowed : constant Permission := (others => Allow_Right); Execute_As_User : constant Permission := Permission'(Execute_As_User_R => Allow_Right, others => Deny_Right); Execute_As_Group : constant Permission := Permission'(Execute_As_Group_R => Allow_Right, others => Deny_Right); Keep_In_Memory : constant Permission := Permission'(Keep_In_Memory_R => Allow_Right, others => Deny_Right); Owner_Read : constant Permission := Permission'(Owner_Read_R => Allow_Right, others => Deny_Right); Owner_Write : constant Permission := Permission'(Owner_Write_R => Allow_Right, others => Deny_Right); Owner_Execute : constant Permission := Permission'(Owner_Execute_R => Allow_Right, others => Deny_Right); Group_Read : constant Permission := Permission'(Group_Read_R => Allow_Right, others => Deny_Right); Group_Write : constant Permission := Permission'(Group_Write_R => Allow_Right, others => Deny_Right); Group_Execute : constant Permission := Permission'(Group_Execute_R => Allow_Right, others => Deny_Right); World_Read : constant Permission := Permission'(World_Read_R => Allow_Right, others => Deny_Right); World_Write : constant Permission := Permission'(World_Write_R => Allow_Right, others => Deny_Right); World_Execute : constant Permission := Permission'(World_Execute_R => Allow_Right, others => Deny_Right); Read_Only : constant Permission := Permission'(World_Execute_R | Group_Execute_R | Owner_Execute_R | World_Read_R | Group_Read_R | Owner_Read_R => Allow_Right, others => Deny_Right); type Find_File_Info is private; No_More_Files : exception; Error_In_File : exception; Pattern_Error : exception; Error_Name : A_String; function Init_Find_File (Pattern : A_String) return Find_File_Info; function Find_File (Info : Find_File_Info) return A_String; function Matches (Name : A_String; Pattern : A_String) return Boolean; function Exists (Name : A_String) return Boolean; function Canonical_Dir_Name (Lib : A_String) return A_String; function Size (Name : A_String) return Integer; procedure Symlink (Remote_Name : String; Local_Name : String); -- do a symbolic link named local_name to a file named remote_name. procedure Link (Remote_Name : String; Local_Name : String); -- do a hard link named local_name to a file named remote_name. procedure Unlink (File : String); -- unlink (remove) file named 'file' function "+" (A, B : Permission_Vector) return Permission_Vector renames "or"; -- permissions are represented in a bit vector; the same source -- can be used on any unix system; source also ports to vms except if -- delete rights or system rights are specified. This '+' function -- should be used to build rights arrays, eg: -- ... owner_read + group_read ... function Has_Permission (Name : String; Rights : Permission) return Boolean; -- return true iff the file named 'name' exists and has ALL -- of the permissions given TRUE in the 'rights' array. function Get_Permission (Name : String) return Permission; -- get the permission of the named file; doesn't exist then -- raise error_in_file; procedure Set_Permission (Name : String; Rights : Permission); -- turn on the specified rights, set ALL other rights off. -- Note: to ADD rights, first get the permission that already -- exists: -- set_permission("foo", get_permission("foo") + new_rights); function Show_Permission (Rights : Permission) return String; -- display given permission in Unix -rwxrwxrwx format function Show_Protection (Name : String) return String; -- call show_permission on file protection from stat of file 'name' private type Find_File_Rec; type Find_File_Info is access Find_File_Rec; end File_Names;
nblk1=5 nid=0 hdr6=a [0x00] rec0=16 rec1=00 rec2=01 rec3=038 [0x01] rec0=11 rec1=00 rec2=02 rec3=05e [0x02] rec0=16 rec1=00 rec2=03 rec3=07c [0x03] rec0=12 rec1=00 rec2=04 rec3=040 [0x04] rec0=14 rec1=00 rec2=05 rec3=000 tail 0x21548c3ea868434d330ee 0x42a00088462060003