38.9.4.18 Read CF Card file list (specify optional folder, including under subfolder)

Outputs the file list in the CF card to the file passed as a parameter. You can optionally define the folder for which you want to obtain a file list. The list of files read are all the files obtained by recursive searching the folder passed in the parameters.

Function Name

INT WINAPI EasyGetListRecursivelyInCfCard(LPCSTR sNodeName, LPCSTR sDirectory, INT* oiCount, LPCSTR sSaveFileName) ;

Argument

sNodeName: The station name is fixed as #WinGP.

sDirectory: Name of folder to get (all in uppercase characters)

oiCount: Number of files read

sSaveFileName: Name of file to store directory information. In the specified file, data in the stEasyRecursiveDirInfo formatted array is stored as binary data in the quantity returned in oiCount.

struct stEasyRecursiveDirInfo {
  BYTE bFileName[8+1];// Filename (NULL terminated)
  BYTE bExt[3+1];// File extension (NULL terminated)
  BYTE bDummy[3];// Dummy
  DWORD dwFileSize;// File size
  BYTE bFileTimeStamp[8+1];// File timestamp (NULL terminated)
  BYTE bFolderName[260+1];// FolderName (NULL terminated. 0 is stored in the remaining part)
BYTE bDummy2[2];// Dummy-2
} ;

Return value (NULL)

Normal End: 0

Problem: Error code

Special Item

More information about bFileTimeStamp: 8 bytes are divided into two sections. The top 4 bytes are used to store MS-DOS formatted time, and the bottom 4 bytes are used to store MS-DOS formatted date, both as hexadecimal values.

MS-DOS formatted dates and times are set up in the following format.

Example: If 20C42C22, 2C22 is the MS-DOS date displayed in hexadecimal, and 20C4 is the MS-DOS time displayed in hexadecimal. Therefore, this means 2002/1/2 04:06:08.

MS-DOS formatted time. The date uses the following format to pack the date into one 16-bit value.

If the list of read files contains a file name less than 8 characters or a file whose extension is less than 3 characters, bFileName[8+1] and bExt[3+1] are displayed as follows.

bFileName[8+1]

When the file name is less than 8 characters, the empty positions at the start are filled in with "0", after that it's undefined.

bExt[3+1]

When the file extension is less than 3 characters, the empty positions at the start are filled in with "0", after that it's undefined.

(Example) When the file name and extension is "ABC.D"

bFileName[8+1]

0x410x420x430x00******************** (**** asterisks indicate undefined value)

bExt[3+1]

0x440x00******** (**** asterisks indicate undefined value)