void * FileEnumLocateAttr( /* returns NULL if attr not found */
FileEnumCallbackData* fecd, /* Passed to callback routine */
FileExtendedAttribute attr, /* Search for this attribute */
const char * * name); /* Attribute name (if second
* argument is FEA_CUSTOM) */
FileEnum()
can be instructed to call a callback routine to decide which files to filter out. This callback routine is passed an array of
FileExtAttrDesc
structures. To find a particular extended attribute in this array, call
FileEnumLocateAttr()
. This routine will find the address of the value of the attribute desired, and return that address. If the attribute is not in the array,
FileEnumLocateAttr()
will return a null pointer.
Include: fileEnum.h
Boolean FileEnumWildcard(
FileEnumCallbackData * fecd, /* Passed to callback routine */
word frame); /* Inherited stack frame */
This routine is a utility used by
FileEnum()
and is rarely used by applications. It checks to see if the virtual name of the current file (the file currently being evaluated by
FileEnum()
) matches the pattern in the
FEP_cbData1
field of the
FileEnumParams
structure.
The
fecd
parameter is a pointer to the callback data of the
FileEnum()
routine. The frame parameter is a pointer to the
FileEnum()
stack frame: The first dword is the
FEP_cbData1
field, and the second is the
FEP_cbData2
field.
This routine returns
true
(non-zero) if the file name and pattern match. Otherwise, it returns
false
.
Include: fileEnum.h
VMFileHandle FileFromTransferBlockID(id);
TransferBlockID id;
This macro extracts a VMFileHandle from a value of type
TransferBlockID
.
FileAttrs FileGetAttributes( /* Sets thread's error value */
const char * path); /* file's path relative to current
* working directory */
This routine returns the standard
FileAttrs
attributes for a file. The file may be a GEOS file or a plain DOS file. Note that you can also get a file's attributes by getting the file's FEA_FILE_ATTR extended attribute. If an error occurs, this routine sets the thread's error (accessible via
ThreadGetError()
).
See Also: FileAttrs,
FileSetAttributes().
Include: file.h
DiskHandle FileGetCurrentPath(
char * buffer, /* Path string is written here */
word bufferSize); /* Size of buffer in bytes */
This routine writes the current path string (without drive specifier) to the buffer provided. If the buffer is too small, it truncates the path to fit. It returns the handle of the disk containing the current path. If the current path was declared relative to a standard path, the standard path constant will be returned.
Include: file.h
FileDateAndTime FileGetDateAndTime( /* sets thread's error value */
FileHandle fh);
This routine finds out the time a file was last modified. This routine can be called on GEOS or non-GEOS files. Note that you can also find out the modification time of a file by checking the extended attribute FEA_MODIFICATION. If unsuccessful, it sets the thread's error value (accessible via
ThreadGetError()
).
See Also: FileDateAndTime,
FileSetDateAndTime().
Include: file.h
GEOS SDK TechDocs
|
|
FileEnum() ...
|
FileGetDiskHandle() ...