ePass1000 C/C++ API Reference Manual Version 2.0 |
The epas_Directory function is used to enumerate files and directories under the current directory. Use epas_ChangeDir to change into the desired directory. The index should be set to 0 for the first call and incremented until all information desired has been returned.
EPAS_STATUS EPAS_API epas_Directory( EPAS_HANDLE hContextHandle, // [in] unsigned long ulFlags, // [in] unsigned long ulIndex, // [in] PEPAS_FILEINFO pFileInfo, // [out] unsigned long ulSizeOfFileInfo // [in] );
epas_CreateContext, epas_OpenDevice
You should first zero initialize this structure before invoke the epas_Directory function.
To enumerate all directories and files on a device, initialize the ulIndex parameter to zero, and increment it upon each successive call to epas_Directory. When no more directories and files remain, FT_FILE_NOT_FOUND will be returned.
For a list of reserved directory IDs, see EPAS_DIRINFO.
If the function succeeds, FT_SUCCESS returned.
If the specified directory not found, FT_DIR_NOT_FOUND returned.
If the specified file not found, FT_FILE_NOT_FOUND returned.
For a list of all return codes, see Status Return Values.
epas_CreateFile, epas_DeleteFile, epas_OpenFile, epas_CloseFile, epas_GetFileInfo, epas_Read, epas_Write, epas_CreateDir, epas_DeleteDir, epas_GetCurrentDir, epas_ChangeDir