FS_SearchFile(
PIOREQ pir
)
All DOS find first and find next operations are performed through FS_SearchFile. This routine handles the INT 21h functions: 11h, 12h, 4Eh, and 4Fh.
Search Operation Values: | |
Value | Meaning |
---|---|
SEARCH_FIRST | Do a FindFirst operation on the path passed in. |
SEARCH_NEXT | Do a FindNext operation on the path passed in on the SEARCH_FIRST operation. |
Search Attribute Values:
Any combination of the following attributes may be specified, causing those files to be included with normal files in the search. |
|
Value | Meaning |
---|---|
FILE_ATTRIBUTE_HIDDEN | Include hidden file in search. |
FILE_ATTRIBUTE_SYSTEM | Include system file in search. |
FILE_ATTRIBUTE_DIRECTORY | Include subdirectories in search.
The following attribute will only be specified by itself. It will not be combined with any of the other attributes. |
FILE_ATTRIBUTE_VOLUMELABEL | Search for volume label only. |
ir_error | Returns status of the operation ( 0 if no error, errorcode otherwise ). |
ir_data | Returns the information about the find in the search info structure. The contents of the supplied structure is the same as the information returned on a path based Int 21h search function. On a successful return the search info structure returns information required for a find next request that is filled in by the FSD. This information is stored in the users address space and is passed back on find next requests. |
Search Info Structure: | |
Value | Meaning |
---|---|
se_key | Search key structure that contains information pertinent to the search operation that is in progress. |
Search Key Structure: | |
Value | Meaning |
sk_drive | Drive value. This field is set by the IFS manager and will be overwritten. The FSD should not change this field. |
sk_pattern[11] | Returns filename pattern being searched for. This field is set and used by the FSD to continue the search operation. The filename must be stored in the FCB 8.3 format. |
sk_attr | Search attributes. This field is set and used by the FSD to continue searches. |
sk_localFSD[4] | Returns local FSD continuation fields. These bytes should be used to save the information required to continue the search operation. The typical values saved are those used to locate the directory and the last entry with in the directory. |
sk_netFSD[2] | Returns remote FSD continuation fields. These bytes should be used to save the information required to continue the search operation by network FSDs. |
sk_ifsmgr[2] | Reserved for use by the IFS manager. |
se_attrib | Returns attributes of matched file. |
Return Attribute Values:
Any combination of the following attributes may be returned. |
|
Value | Meaning |
---|---|
FILE_ATTRIBUTE_READONLY | Read-Only file. |
FILE_ATTRIBUTE_HIDDEN | Hidden file. |
FILE_ATTRIBUTE_SYSTEM | System file. |
FILE_ATTRIBUTE_DIRECTORY | Subdirectory. |
FILE_ATTRIBUTE_ARCHIVE | Archive file.
This attribute cannot be returned in combination with other attributes. |
FILE_ATTRIBUTE_VOLUMELABEL | Volume label. |
se_time | Returns DOS file time of matched file. This field is set by the FSD. |
se_date | Returns DOS file date of matched file. This field is set by the FSD. |
se_size | Returns size of matched file. This field is set by the FSD. |
se_name[13] | Returns filename of matched file. This field is set by the FSD to the matching filename found by the search. The filename must be stored as an 8.3 format ASCIIZ string. |
ir_firstclus | Returns first cluster of the file. This field is needed only for FCB-based search operations and is updated separately by the IFS. This field is valid only for FAT-based file systems. A zero value should be returned by non-FAT-based FSDs. |