home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
VRAC
/
TVPROMPT.EXE
/
DOS_IO.LIB
< prev
next >
Wrap
Text File
|
1990-01-16
|
2KB
|
58 lines
with System;
package Dos_IO is
Mode_Error,
Name_Error,
Use_Error,
Status_Error,
Dos_Error: exception;
type File_Handle is limited private;
function Is_Open(Handle : in File_Handle) return Boolean;
procedure Open(Name : in String;
Handle : in out File_Handle);
type Byte_Counts is range 0 .. 65535;
for Byte_Counts'Size use 16;
type Byte_Locations is range 0 .. 100_000_000; -- allow 100 Mb
-- ask for N bytes, return nr actually read,0->EOF
function Read(F : in File_Handle;
Where : in System.Address;
How_Many_Bytes: in Byte_Counts) return Byte_Counts;
procedure Skip(F : in File_Handle;
Bytes_To_Skip: in Byte_Counts);
procedure Rewind(F : in File_Handle);
procedure Move_To(F : in File_Handle;
Where : in Byte_Locations);
procedure Create(Name : in String;
Handle : in out File_Handle);
function Write(F : in File_Handle;
Where : in System.Address;
How_Many_Bytes: in Byte_Counts) return Byte_Counts;
procedure Close(F : in out File_Handle);
function Current_Location(F : in File_Handle) return Byte_Locations;
function Size_Of(F : in File_Handle) return Byte_Locations;
PRIVATE
type File_Handle is record
Dos_File_Handle: System.Word;
Is_Open : Boolean := False;
end record;
end Dos_IO;