Scans the specified directory for the specified file (or directory) and returns the associated directory entry information in the DOS name space
#include <nwfile.h>
or
#include <nwcalls.h>
N_EXTERN_LIBRARY(NWCCODE) NWIntScanFileInformation2 (
NWCONN_HANDLE conn,
NWDIR_HANDLE dirHandle,
const nstr8 N_FAR *filePattern,
nuint8 searchAttrs,
pnuint8 iterHandle,
NW_FILE_INFO2 N_FAR *info,
nuint16 augmentFlag);
uses calwin32
Function NWIntScanFileInformation2
(conn : NWCONN_HANDLE;
dirHandle : NWDIR_HANDLE;
const filePattern : pnstr8;
searchAttrs : nuint8;
iterHandle : pnuint8;
Var info : NW_FILE_INFO2;
augmentFlag : nuint16;
) : NWCCODE;
(IN) Specifies the NetWare server connection handle.
(IN) Specifies the NetWare directory handle relative to the filePattern parameter (or 0 if the filePattern parameter points to the complete path, including the volume name).
(IN) Points to the string containing the file name or wildcard pattern to use in the search.
(IN) Specifies the attributes to use for searching.
(IN/OUT) Inputs a pointer to the sequence number (set the first 4 bytes to 0xFF initially). Outputs a pointer to the 9-byte sequence number to be used for subsequent iterations.
(OUT) Points to the NW_FILE_INFO2 structure containing the file information.
(IN) Specifies if wildcards are augmented:
Note that if the high-order bit of a wildcard character is 1, NetWare interprets that character as being a DOS wildcard (which is also called an augmented wildcard) and uses DOS rules for interpretation of that wildcard.
These are common return values; see Return Values (Return Values for C) for more information.
The searchAttrs parameter includes system and/or hidden files. If only the system bit is set in the searchAttrs parameter, all files are affected except hidden files. If only the hidden bit is set, all files are affected except system files. When neither bit is set (0x00), only files that are not designated either hidden or system are affected.
NOTE:A file is designated hidden or system if its corresponding file attribute is set.
The searchAttrs parameter can have the following values:
|
C Value |
Delphi Value |
Value Name |
|---|---|---|
|
0x00 |
$00 |
FA_NORMAL |
|
0x02 |
$02 |
FA_HIDDEN |
|
0x04 |
$04 |
FA_SYSTEM |
|
0x10 |
$10 |
FA_DIRECTORY |
The iterHandle parameter points to a 9-byte identifier the server uses as an index for searching. In the first call to NWIntScanFileInformation2, the first 4 bytes of the number need to be set to 0xFF accomplished by typecasting the pointer to an nuint32, and assigning -1, or 0xFFFFFFFF to it. Every time NWIntScanFileInformation2 is called, the sequence number for the next iteration is returned.