APTR handle = hw_FOpen(STRPTR name, int mode);
HWFOPENMODE_READ_LEGACY:
HWFOPENMODE_WRITE
and HWFOPENMODE_READWRITE
. Please note that this flag is actually set to 0 for compatibility
reasons. This means that hw_FOpen()
cannot use the bitwise AND-operator to check if it is set.
Instead, it will check if either HWFOPENMODE_WRITE
or HWFOPENMODE_READWRITE
is set.
If both aren't set, then it will assume that HWFOPENMODE_READ_LEGACY
is set and will open
the file for reading. You should only use this flag if you also need to target Hollywood 5.
For Hollywood 6.0 and higher, use HWFOPENMODE_READ_NEW
instead (see below).
HWFOPENMODE_WRITE:
hw_FOpen()
will create it
first. This is mutually exclusive with HWFOPENMODE_READ_NEW
and HWFOPENMODE_READWRITE
.
HWFOPENMODE_READWRITE:
HWFOPENMODE_WRITE
and HWFOPENMODE_READ_NEW
.
HWFOPENMODE_READ_NEW:
HWFOPENMODE_WRITE
and HWFOPENMODE_READWRITE
. Please note that this flag requires Hollywood 6.0. If you
want to open files for reading with earlier Hollywood versions, use HWFOPENMODE_READ_LEGACY
.
See above for details. (V6.0)
HWFOPENMODE_NOFILEADAPTER:
HWFOPENMODE_EMULATESEEK:
HWFOPENFLAGS_NOSEEK
flag set. Emulation of the seek functionality is done by simply reading bytes from the
file until the desired seek position has been reached. This is of course highly inefficient
for large seek distances so it should only be used on small files or to bridge small
seek distances. (V6.0)
HWFOPENMODE_FORCEUTF8:
name
to always be
in UTF-8 encoding. By default, Hollywood expects the string to be in the encoding
of the current script. You can override this behaviour by setting HWFOPENMODE_FORCEUTF8
.
(V7.0)
HWFOPENMODE_WONTSEEK:
HWFOPENMODE_WONTSEEK
,
it's still allowed to call FSeek() to query the current cursor position, to query
the file size by seeking to position 0 with mode set to HWFSEEKMODE_END
or to rewind the
file back to 0. (V10.0)
This function is thread-safe.
NULL
on error