--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->
APTR AllocDosObject64(
ULONG type,
const struct TagItem * tags );
APTR AllocDosObject64Tags(
ULONG type,
TAG tag, ... );
Creates a dos object of a given type, for use with the 64-bit dos64.library functions. Free the object with FreeDosObject64() when done.
type - object type (DOS64_FIB, DOS64_INFODATA, DOS64_RECORDLOCK,
see <dos/dos64.h>)
tags - future extensions, pass NULL
Pointer to the new object, or NULL on failure. IoErr() gives additional information in that case.
LONG ChangeFilePosition64(
BPTR file,
LONG mode,
QUAD position );
Changes the current read/write position in a file with full 64-bit range. Behaves like Seek64() but returns a boolean result instead of the previous position, matching the AmigaOS 4 style API.
file - filehandle
mode - Where to count from. Either OFFSET_BEGINNING,
OFFSET_CURRENT or OFFSET_END.
position - relative offset in bytes (positive, negative or 0).
Boolean success indicator; on DOSFALSE, IoErr() gives additional information.
LONG ChangeFileSize64(
BPTR file,
LONG mode,
QUAD size );
Change the size of a file with full 64-bit range. Behaves like SetFileSize64() but returns a boolean result instead of the new size, matching the AmigaOS 4 style API.
file - filehandle mode - OFFSET_BEGINNING, OFFSET_CURRENT or OFFSET_END size - relative size
Boolean success indicator; on DOSFALSE, IoErr() gives additional information.
LONG Examine64(
BPTR lock,
struct FileInfoBlock64 * fib,
struct TagItem * tags );
LONG Examine64Tags(
BPTR lock,
struct FileInfoBlock64 * fib,
TAG tag, ... );
Fill a 64-bit FileInfoBlock with information about the object the given lock refers to. If the filesystem does not support 64-bit examination the request is delegated to the 32-bit Examine() and the result is widened; sizes are then limited to what the filesystem reports in 32 bits.
lock - lock on the object to examine
fib - FileInfoBlock64 to fill, allocated with
AllocDosObject64(DOS64_FIB, NULL) or at least longword
aligned
tags - future extensions, pass NULL
Boolean success indicator. On failure IoErr() gives additional information.
LONG ExamineFH64(
BPTR fh,
struct FileInfoBlock64 * fib,
struct TagItem * tags );
LONG ExamineFH64Tags(
BPTR fh,
struct FileInfoBlock64 * fib,
TAG tag, ... );
Fill a 64-bit FileInfoBlock with information about an open file. If the filesystem does not support 64-bit examination the request is delegated to the 32-bit ExamineFH() and the result is widened. In that case the file size is additionally corrected through the filesystem's 64-bit size query, when it provides one.
fh - filehandle to examine
fib - FileInfoBlock64 to fill, allocated with
AllocDosObject64(DOS64_FIB, NULL) or at least longword
aligned
tags - future extensions, pass NULL
Boolean success indicator. On failure IoErr() gives additional information.
LONG ExNext64(
BPTR lock,
struct FileInfoBlock64 * fib,
struct TagItem * tags );
LONG ExNext64Tags(
BPTR lock,
struct FileInfoBlock64 * fib,
TAG tag, ... );
Examine the next entry of a directory, continuing an enumeration started with Examine64() on the same FileInfoBlock64. If the filesystem does not support 64-bit examination the request is delegated to the 32-bit ExNext() and the result is widened; sizes are then limited to what the filesystem reports in 32 bits.
lock - lock on the directory being enumerated
fib - FileInfoBlock64 as filled by the previous Examine64()
or ExNext64() call
tags - future extensions, pass NULL
Boolean success indicator. On failure IoErr() gives additional information; ERROR_NO_MORE_ENTRIES means the enumeration is complete.
void FreeDosObject64(
ULONG type,
APTR ptr );
Frees an object allocated with AllocDosObject64().
type - object type the object was allocated with ptr - pointer to the object; may be NULL
None.
QUAD GetFilePosition64(
BPTR file );
Read the current read/write position in a file with full 64-bit range, without changing it. Buffered data on the filehandle is taken into account.
file - filehandle
Current absolute position in bytes, or -1 if an error happened. IoErr() will give additional information in that case.
QUAD GetFileSize64(
BPTR file );
Read the size of an open file with full 64-bit range. If the filesystem does not support 64-bit operations the size is obtained via ExamineFH() or, as a last resort, by seeking.
file - filehandle
Size of the file in bytes, or -1 if an error happened. IoErr() will give additional information in that case.
Pending buffered writes on the filehandle are flushed first.
LONG Info64(
BPTR lock,
struct InfoData64 * parameterBlock );
Get information about a volume in the system, with 64-bit block counts. If the filesystem does not support the 64-bit query the request is delegated to the 32-bit Info() and the result is widened; block counts are then limited to what the filesystem reports in 32 bits.
lock - a lock on any file on the volume for which
information should be supplied, or 0 for the
volume of GetFileSysTask()
parameterBlock - pointer to a longword-aligned InfoData64
structure
Boolean indicating success or failure. If TRUE (success) the 'parameterBlock' is filled with information on the volume.
LONG IsFileSystem64(
BPTR file );
Query whether the filesystem behind an open file understands 64-bit packets, i.e. whether the 64-bit dos64.library operations on it are handled natively rather than through 32-bit delegation. Applications may use this to cache the capability per file and skip 64-bit attempts on filesystems that cannot service them.
file - filehandle to query
DOSTRUE when the filesystem handles 64-bit packets, DOSFALSE otherwise.
The query is answered with (position-neutral) probe packets; no file state is modified.
BOOL LockRecord64(
struct RecordLock64 * rec,
ULONG timeout );
Lock a portion of a file for exclusive access, with 64-bit offsets. The record is described by a RecordLock64 structure holding the filehandle, offset, length and locking mode. A timeout may be specified which is the maximum amount of time to wait for the record to become available. If the filesystem does not support 64-bit record locking the request is delegated to the 32-bit LockRecord(), provided the record lies within the first 4GB of the file.
rec - the record to lock (rec_FH, rec_Offset, rec_Length
and rec_Mode must be filled in)
timeout - timeout interval measured in ticks (may be 0)
Success/failure indicator. On failure IoErr() gives additional information; ERROR_OBJECT_TOO_LARGE indicates the record is not representable on the filesystem.
Record locks are cooperative, meaning that they only affect other calls to LockRecord()/LockRecord64().
BOOL LockRecords64(
struct RecordLock64 * recArray,
ULONG timeout );
Lock several records of files for exclusive access, with 64-bit offsets. The array is terminated by an entry with rec_FH set to NULL. If any lock in the array fails, all already obtained locks are released again.
recArray - array of RecordLock64 entries to lock
timeout - timeout interval measured in ticks (may be 0),
applied to each record
Success/failure indicator. On failure IoErr() gives additional information.
QUAD Read64(
BPTR file,
APTR buffer,
QUAD length );
Read some data from a given file with a 64-bit length. The request is passed to the filesystem in chunks the 32-bit ACTION_READ packet can carry, so it works with every filesystem - no buffering is involved.
file - filehandle
buffer - pointer to buffer for the data
length - number of bytes to read. The filesystem is advised
to try to fulfill the request as well as possible.
The number of bytes actually read, 0 if the end of the file was reached, -1 if an error happened. If an error occurs after some data has already been transferred, the number of bytes read so far is returned and IoErr() gives the error.
QUAD Seek64(
BPTR file,
LONG mode,
QUAD position );
Changes the current read/write position in a file with full 64-bit range, and/or reads the current position, e.g. to get the current position do a Seek64(file, 0, OFFSET_CURRENT). If the filesystem does not support 64-bit operations the request is delegated to the 32-bit Seek(), provided the position is representable in 32 bits.
file - filehandle
mode - Where to count from. Either OFFSET_BEGINNING,
OFFSET_CURRENT or OFFSET_END.
position - relative offset in bytes (positive, negative or 0).
Absolute position in bytes before the Seek64(), -1 if an error happened. IoErr() will give additional information in that case. If the position is not representable on the filesystem, IoErr() returns ERROR_OBJECT_TOO_LARGE.
QUAD SetFileSize64(
BPTR file,
LONG mode,
QUAD offset );
Change the size of a file with full 64-bit range. If the filesystem does not support 64-bit operations the request is delegated to the 32-bit SetFileSize(), provided the offset is representable in 32 bits.
file - filehandle mode - OFFSET_BEGINNING, OFFSET_CURRENT or OFFSET_END offset - relative size
New size of the file or -1 in case of an error. IoErr() gives additional information in that case. If the size is not representable on the filesystem, IoErr() returns ERROR_OBJECT_TOO_LARGE.
BOOL UnLockRecord64(
struct RecordLock64 * rec );
Release a record lock obtained with LockRecord64(). The rec_FH, rec_Offset, rec_Length values must match the lock request exactly.
rec - the record to unlock
Success/failure indicator. On failure IoErr() gives additional information.
BOOL UnLockRecords64(
struct RecordLock64 * recArray );
Release the record locks obtained with LockRecords64(). The array is terminated by an entry with rec_FH set to NULL.
recArray - array of RecordLock64 entries to unlock, as passed
to LockRecords64()
Success/failure indicator. Unlocking continues over failing entries; the result of the last failing unlock is returned and IoErr() gives additional information.
QUAD Write64(
BPTR file,
CONST_APTR buffer,
QUAD length );
Write some data to a given file with a 64-bit length. The request is passed to the filesystem in chunks the 32-bit ACTION_WRITE packet can carry, so it works with every filesystem - no buffering is involved.
file - filehandle buffer - pointer to the data to write length - number of bytes to write.
The number of bytes actually written, -1 if an error happened. If an error occurs after some data has already been transferred, the number of bytes written so far is returned and IoErr() gives the error.