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

⟦35ff926cc⟧ TextFile

    Length: 2181 (0x885)
    Types: TextFile
    Names: »B«

Derivation

└─⟦516dceb10⟧ Bits:30000751 8mm tape, Rational 1000, RCI_VADS
    └─ ⟦9a14c9417⟧ »DATA« 
        └─⟦this⟧ 

TextFile

separate (Library_Extensions)
procedure File_Exists  
             (Remote_Filename   :        String;
              Remote_Machine    :        String;
              Remote_Connection : in out Rci.Context;  
              Status            : in out Simple_Status.Condition;
              Exists            : out    Boolean) is

begin

    Simple_Status.Initialize (Status);
    Exists := False;
    Acquire_Connection  
       (Remote_Connection => Remote_Connection,
        Remote_Machine    => Remote_Machine,
        Status            => Status);

    if not Simple_Status.Error (Status) then
        Rci.Execute_Command  
           (Command_Line          => "test -r " & Remote_Filename,
            Remote_Connection     => Remote_Connection,
            Status                => Status,
            Error_Pattern         => "",
            Parse_Error_Output    => False,
            Parse_Standard_Output => False,
            Show_Parsed_Output    => True,
            Trace_Command         => Trace_Rci_Commands);


        if not Simple_Status.Error (Status) then
            Exists := True;
        else
            --reset the status to a "good" status and Exists remains false
            Simple_Status.Initialize (Status);
            -- Log.Put_Line
            --    (Message => Simple_Status.Message (Status),
            --     Kind    => Profile.Error_Msg);
            -- Set_Status
            --    (Status     => Status,
            --     Error_Type => "Remote_Operation_Error",
            --     Message    => "Error testing for file existence.",
            --     Severity   => Simple_Status.Problem);
        end if;

    else
        Log.Put_Line  
           (Message => Simple_Status.Message (Status),  
            Kind    => Profile.Error_Msg);
        Set_Status  
           (Status     => Status,
            Error_Type => "Remote_Operation_Error",
            Message    => "Error acquiring connection while trying to" &
                             " test for file existence.",
            Severity   => Simple_Status.Problem);
    end if;

exception
    when others =>
        Unhandled_Exception (Status, "File_Exists");
end File_Exists;