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: ┃ B T

⟦0a664b3a7⟧ TextFile

    Length: 2856 (0xb28)
    Types: TextFile
    Names: »B«

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

separate (Directory)
package body Traversal is
    function Root return Object is
        O : Object;
    begin
        Gs.Create (O.Name, "/");
        return O;
    end Root;

    function Home return Object is
        O : Object;
    begin
        Gs.Create (O.Name, Di.Get_Home_Directory);
        return O;
    end Home;


    function Parent (The_Object : Object) return Object is
        O : Object;
    begin
        if The_Object /= Root then
            Gs.Create (O.Name, Naming.Prefix (Naming.Full_Name (The_Object)));
        else
            raise Non_Existent_Object_Error;
        end if;
        return O;
    end Parent;


    function Child (The_Object : Object; Child_Name : Naming.Simple_String_Name)
                   return Object is
        O           : Object;
        Object_Name : constant String :=
           Naming.Full_Name (The_Object) & "/" & Child_Name;
    begin
        if Di.Existent_Entry (Path => Object_Name) then
            Any_Object.Open (The_Object => O, Object_Name => Object_Name);
            return O;
        else
            raise Non_Existent_Object_Error;
        end if;
    end Child;


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

        -- Pattern is not yet implemented !!!
        -- children will allways return all the object of the specified class

        Max_Iter : Integer;
        Iter     : Iterator;
        Obj      : Object;
    begin

        Object_Set.Make_Empty (Set_Of_Objects);

        if not Di.Is_Directory (Path => Naming.Full_Name (The_Object)) then
            Put_Error_Message ("The object is not a directory");
            raise System_Error;
        end if;
        Max_Iter := Di.Scan_Directory (Path => Naming.Full_Name (The_Object));
        if Max_Iter < 0 then  
            Put_Error_Message;
            raise System_Error;
        else
            Max_Iter := Max_Iter - 1;
            while Max_Iter >= 0 loop
                Obj := Child (The_Object => The_Object,
                              Child_Name => Di.Entry_Value (Max_Iter));
                if not Is_Nil (Obj) then
                    if Equal (Class1 => Class, Class2 => Unknown_Class) then
                        Object_Set.Add (Set_Of_Objects, Obj);
                    else
                        if Equal (Class1 => Class,
                                  Class2 => Directory.Class (Obj)) then
                            Object_Set.Add (Set_Of_Objects, Obj);
                        end if;
                    end if;
                end if;
                Max_Iter := Max_Iter - 1;
            end loop;
        end if;
        Reset (Iter);
        return Iter;
    end Children;
end Traversal;