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 FileInfoBlock * fib,
struct TagItem * tags );
LONG Examine64Tags(
BPTR lock,
struct FileInfoBlock * fib,
TAG tag, ... );
Function
Fill a FileInfoBlock with information about the object the
given lock refers to, including the 64-bit fib_Size64 and
fib_NumBlocks64 fields. fib_Size is 0 when the size does not
fit in 31 bits.
If the filesystem does not support 64-bit examination the
request is delegated to the 32-bit Examine(); the 64-bit fields
then hold what the filesystem reports in 32 bits.
Result
Boolean success indicator. On failure IoErr() gives additional
information.
ExamineFH64()
Synopsis
LONG ExamineFH64(
BPTR fh,
struct FileInfoBlock * fib,
struct TagItem * tags );
LONG ExamineFH64Tags(
BPTR fh,
struct FileInfoBlock * fib,
TAG tag, ... );
Function
Fill a FileInfoBlock with information about an open file,
including the 64-bit fib_Size64 and fib_NumBlocks64 fields.
fib_Size is 0 when the size does not fit in 31 bits.
If the filesystem does not support 64-bit examination the
request is delegated to the 32-bit ExamineFH(). 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.
ExamineName64()
Synopsis
LONG ExamineName64(
CONST_STRPTR name,
struct FileInfoBlock * fib,
struct TagItem * tags );
LONG ExamineName64Tags(
CONST_STRPTR name,
struct FileInfoBlock * fib,
TAG tag, ... );
Function
Fill a 64-bit FileInfoBlock with information about the named
object.
A file that is open for writing cannot be locked. When the lock
fails with ERROR_OBJECT_IN_USE the entry is read from the
directory that contains it, so the size of a file that is being
written is available too.
Result
Boolean success indicator. On failure IoErr() gives additional
information.
Notes
This is an extension of dos64.library; it needs the version that
has it.
ExNext64()
Synopsis
LONG ExNext64(
BPTR lock,
struct FileInfoBlock * fib,
struct TagItem * tags );
LONG ExNext64Tags(
BPTR lock,
struct FileInfoBlock * fib,
TAG tag, ... );
Function
Examine the next entry of a directory, continuing an
enumeration started with Examine64() on the same
FileInfoBlock. The 64-bit fields are filled as by Examine64().
If the filesystem does not support 64-bit examination the
request is delegated to the 32-bit ExNext(); the 64-bit fields
then hold 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.
The block starts with a standard InfoData; the 64-bit block
counts are in id_NumBlocks64 and id_NumBlocksUsed64.
If the filesystem does not support the 64-bit query the
request is delegated to the 32-bit Info(), and the 64-bit
counts are taken from ACTION_QUERY_ATTR (FQA_NumBlocks,
FQA_NumBlocksUsed) when the filesystem answers it, otherwise
from the 32-bit counts.
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.