int ok = hw_Stat(STRPTR name, 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:
HWSTATTYPE_DIRECTORY:
Size:
Flags:
Time:
LastAccessTime:
CreationTime:
FullPath:
hw_Stat()
. If you set the
HWSTATFLAGS_ALLOCSTRINGS
flag, hw_Stat()
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_Stat()
in a multithreaded environment.
Comment:
hw_Stat()
. This may be NULL
if
the file system does not support comments for its objects. If you set the
HWSTATFLAGS_ALLOCSTRINGS
flag, hw_Stat()
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_Stat()
in a multithreaded environment.
LinkMode:
Container:
The following flags are supported by hw_Stat()
:
HWSTATFLAGS_NOFILEADAPTER:
HWSTATFLAGS_ALLOCSTRINGS:
hw_Stat()
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_Stat()
in a multithreaded environment.
hw_Stat()
returns True
on success or False
on failure.
hw_Stat()
can be used to find out whether a certain file system object is a file or a directory
or to resolve relative file name specifications into absolute, fully-qualified paths.
This function is only thread-safe if you set the HWSTATFLAGS_ALLOCSTRINGS
flag.
struct hwos_StatStruct
for storing information
about the file system objectNULL
)True
on success, False
otherwise