DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦a06e6336f⟧ TextFile

    Length: 9545 (0x2549)
    Types: TextFile
    Names: »V«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Our_Generic_String;  
with Set_Generic;
with Calendar;  
package Directory is


    Already_Existent_Object_Error : exception;
    Non_Existent_Object_Error     : exception;
    System_Error                  : exception;


    type Object is private;

    -- Objects in the directory system are accessed via Directory.Object

    function Nil return Object;
    function Is_Nil (The_Object : Object) return Boolean;

    function Same_Object (Left, Right : Object) return Boolean;

    type Class_Enumeration is new Natural range 0 .. 63;

    Unknown_Class           : constant Class_Enumeration := 0;
    Directory_Class         : constant Class_Enumeration := 1;
    File_Class              : constant Class_Enumeration := 2;
    Link_Class              : constant Class_Enumeration := 3;
    Fifo_Class              : constant Class_Enumeration := 4;
    Socket_Class            : constant Class_Enumeration := 5;
    Character_Special_Class : constant Class_Enumeration := 6;
    Bloc_Special_Class      : constant Class_Enumeration := 7;
    Multiplex_File_Class    : constant Class_Enumeration := 8;

    function Class (The_Object : Object) return Class_Enumeration;
    function Equal (Class1, Class2 : Class_Enumeration) return Boolean;
    function Image (The_Class : Class_Enumeration) return String;
    function Value (S : String) return Class_Enumeration;


    type Iterator is private;

    procedure Next  (Iter : in out Iterator);
    function  Done  (Iter : Iterator) return Boolean;
    function  Value (Iter : Iterator) return Object;
    procedure Reset (Iter : in out Iterator);


--  to get the message associated with the UNIX errno varaible value

    function Get_Error_Message return String;


    package Naming is

        -- Provides mechanisms for manipulating and resolving names and for
        -- establishing a context for name resolution.

        subtype String_Name is String;

        -- Lexically and syntactically a Directory system string name.

        subtype Simple_String_Name is String;

        -- A single segment of a string name.

        subtype Context is Object;

        -- The Directory System Object that serves as the initial context
        -- for name resolution.  May be any Object.

        procedure Set_Default_Context (The_Context : Naming.String_Name);

        procedure Set_Default_Context (The_Context : Naming.Context);

        -- Establishes the default naming context for the job.

        function Default_Context return Naming.String_Name;
        function Default_Context return Naming.Context;

        -- Returns the default name resolution context for the job.


        function Absolute (The_Name : String_Name) return Boolean;

        -- return true if the_name is an absolute path name

        function Absolute_Name (The_Name : String_Name) return String_Name;

        -- return the corresponding absolute path name


        function Prefix (The_Name : String_Name) return String_Name;

        -- Removes the last segment from a selected name and returns
        -- the prefix.
        -- Prefix ("A/B/C") => "A/B"
        -- Prefix ("A") => ""


        function Simple_Name (The_Name : String_Name) return Simple_String_Name;

        -- Returns only the last segment of a selected name, without attributes
        -- Simple_name ("A/B/C") => "C"
        -- Simple_name ("A") => "A"


        function Simple_Name_Without_Extension
                    (The_Name : String_Name) return Simple_String_Name;


        function Head (The_Name : String_Name) return Simple_String_Name;

        -- Returns only the first segment of a selected name.
        -- Head ("A/B/C") => "A"
        -- Head ("A") => "A"
        -- Head ("/A") => "/"

        function Tail (The_Name : String_Name) return String_Name;

        -- Removes the first segment from a selected name and returns the tail.
        --      Tail ("A/B/C") => "B/C"
        -- Tail ("A") => ""

        function Extension (A_Name : String_Name) return String;

        -- Returns the Extension at the end of the given string name.
        -- If the simple name of the given string name has no attributes,
        -- the null string is returned.

        function Full_Name (The_Object : Object) return Naming.String_Name;

        -- Computes the fully qualified string name for the The_Object.

        function Simple_Name (The_Object : Object) return Simple_String_Name;

        -- Computes the simple name for the The_Object.

        function Simple_Name_Without_Extension
                    (The_Object : Object) return Simple_String_Name;

    end Naming;

    package Traversal is
        -- Provides operations for traversing the Directory System
        -- in a variety of ways.

        function Root return Object;

        -- Returns the (somewhat special) Object corresponding to the
        -- root of the universe.

        function Home return Object;

        -- returns the object corresponding to the home directory

        function Parent (The_Object : Object) return Object;

        -- Returns the parent Object for The_Object.

        function Child (The_Object : Object;
                        Child_Name : Naming.Simple_String_Name) return Object;

        -- Retrieve the named subobject.

        function Children (The_Object : Object;
                           Pattern    : Naming.Simple_String_Name := "*";
                           Class      : Class_Enumeration := Unknown_Class)
                          return Iterator;

        -- Initializes the iteration over the children that match the
        -- specified name pattern.
        -- If a class is provided, only children of that class are returned.

    end Traversal;

    package Statistics is

        subtype User is String;

        subtype Group is String;

        subtype Permission_Enumeration is Integer range 0 .. 7;

        None_Permission  : constant Permission_Enumeration := 0;
        X_Permission     : constant Permission_Enumeration := 1;
        W_Permission     : constant Permission_Enumeration := 2;
        W_X_Permission   : constant Permission_Enumeration := 3;
        R_Permission     : constant Permission_Enumeration := 4;
        R_X_Permission   : constant Permission_Enumeration := 5;
        R_W_Permission   : constant Permission_Enumeration := 6;
        R_W_X_Permission : constant Permission_Enumeration := 7;

        function Time_Of_Last_Update (The_Object : Object) return Calendar.Time;

        function Time_Of_Last_Read (The_Object : Object) return Calendar.Time;

        function Creator (The_Object : Object) return User;

        function Creator_Group (The_Object : Object) return Group;

        function Object_Size (The_Object : Object) return Integer;

        function Number_Of_Links (The_Object : Object) return Integer;

        function Owner_Permissions (The_Object : Object)
                                   return Permission_Enumeration;

        function Group_Permissions (The_Object : Object)
                                   return Permission_Enumeration;

        function Other_Permissions (The_Object : Object)
                                   return Permission_Enumeration;

        procedure Change_Owner_Permissions
                     (The_Object      : Object;
                      The_Permissions : Permission_Enumeration);

        procedure Change_Group_Permissions
                     (The_Object      : Object;
                      The_Permissions : Permission_Enumeration);

        procedure Change_Other_Permissions
                     (The_Object      : Object;
                      The_Permissions : Permission_Enumeration);

        function Image (The_Permissions : Permission_Enumeration) return String;

        function Value (S : in String) return Permission_Enumeration;

    end Statistics;


    package Any_Object is

        -- Operations to Create, Copy and Destroy Objects.

        procedure Open (The_Object : in out Object; Object_Name : String);

        procedure Create (The_Object               : in out Object;
                          Object_Name              :        String;
                          Object_Class             :        Class_Enumeration :=
                             Directory.Unknown_Class;
                          Object_Owner_Permissions :
                             Directory.Statistics.Permission_Enumeration      :=
                             Directory.Statistics.R_W_Permission;
                          Object_Group_Permissions :
                             Directory.Statistics.Permission_Enumeration      :=
                             Directory.Statistics.R_W_Permission;
                          Object_Other_Permissions :
                             Directory.Statistics.Permission_Enumeration      :=
                             Directory.Statistics.R_W_Permission);

        procedure Copy (Source           :        Object;  
                        Destination_Name : in     String;
                        Destination      : in out Object);

        procedure Rename (Source : in out Object; Destination_Name : in String);

        procedure Delete (The_Object : in out Object);


    end Any_Object;


private

    package Gs is new Our_Generic_String (Default_Maximal_Length => 256);

    type Object is
        record
            Name : Gs.Object := Gs.Undefined_Object;
        end record;

    package Object_Set is new Set_Generic (Element => Object);


    type Iterator is new Object_Set.Iterator;

end Directory;