int more = NextDirEntry(APTR handle, struct hwos_StatStruct *st, struct hwTagList *tags);
NextDirEntry()
needs to return True
if
it has obtained a file system object from the directory or False
if all entries have been
retrieved. If it returns True
, it has to write information about the file system
object retrieved to the struct hwos_StatStruct
pointer passed in parameter 2.
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] }; |
Your NextDirEntry()
implementation needs to write the following information
to the individual structure members:
Type:
HWSTATTYPE_FILE:
HWSTATTYPE_DIRECTORY:
Size:
Flags:
Time:
LastAccessTime:
CreationTime:
FullPath:
NextDirEntry()
. Please
note that in contrast to its name, FullPath
must not be set to a fully qualified
path but just to the name of the file system object without any path components.
Comment:
NULL
if you do not have this information or the file system doesn't support
storage of comments. The string pointer you pass here must stay valid
until the next call to NextDirEntry()
.
LinkMode:
Container:
NULL
.
struct hwos_StatStruct
for storing information
about the file system objectNULL
)True
if file system object has been retrieved, False
if there are no more objects