NWIntScanFileInformation2

Scans the specified directory for the specified file (or directory) and returns the associated directory entry information in the DOS name space

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #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);
   

Delphi Syntax

   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;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

dirHandle

(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).

filePattern

(IN) Points to the string containing the file name or wildcard pattern to use in the search.

searchAttrs

(IN) Specifies the attributes to use for searching.

iterHandle

(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.

info

(OUT) Points to the NW_FILE_INFO2 structure containing the file information.

augmentFlag

(IN) Specifies if wildcards are augmented:

  • 0 = wildcards are not augmented
  • nonzero = 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.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x8989

NO_SEARCH_PRIVILEGES

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

0x89FF

NO_FILES_FOUND_ERROR

Remarks

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.

NCP Calls