AllocDosObject64()
Synopsis
APTR AllocDosObject64(
ULONG type,
const struct TagItem * tags );
APTR AllocDosObject64Tags(
ULONG type,
TAG tag, ... );
Function
Creates a dos object of a given type, for use with the 64-bit
dos64.library functions. Free the object with FreeDosObject64()
when done.
Result
Pointer to the new object, or NULL on failure. IoErr() gives
additional information in that case.
ChangeFilePosition64()
Synopsis
LONG ChangeFilePosition64(
BPTR file,
LONG mode,
QUAD position );
Function
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.
Result
Boolean success indicator; on DOSFALSE, IoErr() gives
additional information.
ChangeFileSize64()
Synopsis
LONG ChangeFileSize64(
BPTR file,
LONG mode,
QUAD size );
Function
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.
Result
Boolean success indicator; on DOSFALSE, IoErr() gives
additional information.
Examine64()
Synopsis
LONG Examine64(
BPTR lock,
struct FileInfoBlock64 * fib,
struct TagItem * tags );
LONG Examine64Tags(
BPTR lock,
struct FileInfoBlock64 * fib,
TAG tag, ... );
Function
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.
Result
Boolean success indicator. On failure IoErr() gives additional
information.
ExamineFH64()
Synopsis
LONG ExamineFH64(
BPTR fh,
struct FileInfoBlock64 * fib,
struct TagItem * tags );
LONG ExamineFH64Tags(
BPTR fh,
struct FileInfoBlock64 * fib,
TAG tag, ... );
Function
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.
Result
Boolean success indicator. On failure IoErr() gives additional
information.
ExNext64()
Synopsis
LONG ExNext64(
BPTR lock,
struct FileInfoBlock64 * fib,
struct TagItem * tags );
LONG ExNext64Tags(
BPTR lock,
struct FileInfoBlock64 * fib,
TAG tag, ... );
Function
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.
Result
Boolean success indicator. On failure IoErr() gives additional
information; ERROR_NO_MORE_ENTRIES means the enumeration is
complete.
GetFileSize64()
Synopsis
QUAD GetFileSize64(
BPTR file );
Function
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.
Result
Size of the file in bytes, or -1 if an error happened. IoErr()
will give additional information in that case.
Notes
Pending buffered writes on the filehandle are flushed first.
Info64()
Synopsis
LONG Info64(
BPTR lock,
struct InfoData64 * parameterBlock );
Function
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.
Result
Boolean indicating success or failure. If TRUE (success) the
'parameterBlock' is filled with information on the volume.
IsFileSystem64()
Synopsis
LONG IsFileSystem64(
BPTR file );
Function
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.
Result
DOSTRUE when the filesystem handles 64-bit packets, DOSFALSE
otherwise.
Notes
The query is answered with (position-neutral) probe packets;
no file state is modified.
LockRecord64()
Synopsis
BOOL LockRecord64(
struct RecordLock64 * rec,
ULONG timeout );
Function
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.
Result
Success/failure indicator. On failure IoErr() gives additional
information; ERROR_OBJECT_TOO_LARGE indicates the record is
not representable on the filesystem.
Notes
Record locks are cooperative, meaning that they only affect
other calls to LockRecord()/LockRecord64().
LockRecords64()
Synopsis
BOOL LockRecords64(
struct RecordLock64 * recArray,
ULONG timeout );
Function
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.
Result
Success/failure indicator. On failure IoErr() gives additional
information.
Read64()
Synopsis
QUAD Read64(
BPTR file,
APTR buffer,
QUAD length );
Function
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.
Result
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.
Seek64()
Synopsis
QUAD Seek64(
BPTR file,
LONG mode,
QUAD position );
Function
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.
Result
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.
SetFileSize64()
Synopsis
QUAD SetFileSize64(
BPTR file,
LONG mode,
QUAD offset );
Function
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.
Result
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.
UnLockRecord64()
Synopsis
BOOL UnLockRecord64(
struct RecordLock64 * rec );
Function
Release a record lock obtained with LockRecord64(). The
rec_FH, rec_Offset, rec_Length values must match the lock
request exactly.
Result
Success/failure indicator. On failure IoErr() gives additional
information.
UnLockRecords64()
Synopsis
BOOL UnLockRecords64(
struct RecordLock64 * recArray );
Function
Release the record locks obtained with LockRecords64(). The
array is terminated by an entry with rec_FH set to NULL.
Result
Success/failure indicator. Unlocking continues over failing
entries; the result of the last failing unlock is returned and
IoErr() gives additional information.
Write64()
Synopsis
QUAD Write64(
BPTR file,
CONST_APTR buffer,
QUAD length );
Function
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.
Result
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.