ReadDiskDirectory (open)
Read the contents of a directory on disk
Syntax
LOADLIB "wh::files.whlib";
RECORD ARRAY FUNCTION ReadDiskDirectory(STRING directory, STRING mask)Parameters
STRING directoryPath to directory to read.
STRING maskMask of files to read (* to read all files)
Return value
RECORD ARRAYA record array of found files and directories
DATETIME modifiedLast modification time, in UTC
STRING nameName of the directory entry
STRING pathFull path to the directory entry
INTEGER sizeSize of the file, in bytes
INTEGER64 size64Size of the file, in bytes
INTEGER typeType of the directory entry (0=file, 1=directory, 2=link)
INTEGER unixpermissionsUnix file permissions.
Description
Reads a directory, optionally filtering the contents with a mask. The UNIX globbing rules will apply when using this mask (eg, "." only matches files with an extension, not all files as it would do on DOS/NT). This function never returns the "." and ".." directory entries.