APTR handle = hw_Lock(STRPTR name, int mode);
The following bits are currently supported by the mode
parameter:
HWLOCKMODE_READ_LEGACY:
hw_Lock()
cannot use
the bitwise AND-operator to check if it is set. Instead, it will check if the
HWLOCKMODE_WRITE
flag is set and in case it isn't set, the file system object will be
opened in read mode. You should only use this flag if you also need to target Hollywood 5.
For Hollywood 6.0 and higher, use HWLOCKMODE_READ
instead. For Hollywood 10.0 and higher,
use HWLOCKMODE_ANY
instead. (see below).
HWLOCKMODE_WRITE:
HWLOCKMODE_READ:
HWLOCKMODE_READ_LEGACY
. See above for details. Starting with Hollywood 10.0
HWLOCKMODE_READ
is deprecated as well and HWLOCKMODE_ANY
should be used. (V6.0)
HWLOCKMODE_NOADAPTER:
hw_Lock()
will skip all file and directory adapters and use Hollywood's
inbuilt handlers. Use this only if you have a good reason to skip the file and directory
adapters. (V6.0)
HWLOCKMODE_ANY:
hw_Lock()
that any file system object is acceptable, i.e. it
doesn't matter if name
points to a directory or a file. (V10.0)
HWLOCKMODE_FILE:
hw_Lock()
that the file system object specified by name
must
be a file. If it is a directory, hw_Lock()
will fail. (V10.0)
HWLOCKMODE_DIR:
hw_Lock()
that the file system object specified by name
must
be a directory. If it is a file, hw_Lock()
will fail. (V10.0)
This function is thread-safe.
NULL
on error