Command: CMD_PGM_FILES Destination: SD_PGM Destination Channel: 0
Description
Clients use this command to get a list of files from a directory.
Command Data Format
Flag Directory Name padding 1 byte n bytes 0 to 3 bytes Flag
Specifies which block of filenames to return. A value of 0 will return the first group of names, 1 will return the second and subsequent groups of names. The number of filenames returned is dependent on the length of the names. The number of bytes in the returned data will always be less than 4096.Directory NameThe absolute directory name (beginning with a "/") from which the list of filenames is to be read. The directory separator is the forward slash ("/"). The directory name does not need to be null terminated.
Response Data Format
Flag Name Type Character Separator Chars ... 1 byte n bytes 1 byte 2 bytes ... Data for one file Flag
Set to 0 if no more filenames remain to be returned. Set to 1 if more filenames remain to be returned.NameThe name of the file or directory enclosed in quotes ('"'). The name may include spaces or tabs.
Type CharacterA single character that identifies the type of file. The possible values are as follows:Separator Characters
* The file is executable / The file is a directory = The file is a socket | The file is a pipe none The file is a normal file A comma and a space (", "). This sequence follows every filename except the last.
Response Return Codes
RESP_OK Execution of the command was successful. RESP_UNSUPPORTED This command is not supported on the specified channel. RESP_UNREG The specified source channel is not registered with the server. RESP_UNKNOWN_ERR An unknown error occurred.