int ok = hw_FStat(APTR fh, ULONG flags, struct hwos_StatStruct *st, struct hwTagList *tags);
struct hwos_StatStruct
looks like this:
struct hwos_StatStruct { int Type; // [out] DOSINT64 Size; // [out] ULONG Flags; // [out] struct hwos_DateStruct Time; // [out] struct hwos_DateStruct LastAccessTime; // [out] struct hwos_DateStruct CreationTime; // [out] STRPTR FullPath; // [out] STRPTR Comment; // [out] int LinkMode; // [out] STRPTR Container; // [out] }; |
The following information is written to the individual structure members:
Type:
HWSTATTYPE_FILE
.
Size:
Flags:
Time:
LastAccessTime:
CreationTime:
FullPath:
hw_FStat()
. If you set the
HWSTATFLAGS_ALLOCSTRINGS
flag, hw_FStat()
will not use a static string
buffer but allocate a new private string pointer for this structure member.
You will have to call hw_TrackedFree() on this
string when you're done with it in that case. This is useful if you need to
use hw_FStat()
in a multithreaded environment.
Comment:
hw_FStat()
. This may be NULL
if
the file system does not support comments for its objects. If you set the
HWSTATFLAGS_ALLOCSTRINGS
flag, hw_FStat()
will not use a static string
buffer but allocate a new private string pointer for this structure member.
You will have to call hw_TrackedFree() on this
string when you're done with it in that case. This is useful if you need to
use hw_FStat()
in a multithreaded environment.
LinkMode:
Container:
The following flags are supported by hw_FStat()
:
HWSTATFLAGS_ALLOCSTRINGS:
hw_FStat()
will not use static string buffers for
the FullPath
and Comment
structure members but allocate new private string
buffers for them. You will have to call hw_TrackedFree()
on these buffers once you're done with them in that case. This flag is useful
if you need to use hw_FStat()
in a multithreaded environment.
hw_FStat()
returns True
on success or False
on failure.
This function is only thread-safe if you set the HWSTATFLAGS_ALLOCSTRINGS
flag.
Note that before Hollywood 7.1 hw_FStat()
returned a wrong size when used
with virtual files. This bug was fixed in Hollywood 7.1.
struct hwos_StatStruct
for storing information
about the fileNULL
)True
on success, False
otherwise