|
Functions | |
| __FILE_RES | __dirCreate (__CONST __PSTRING name) |
| Creates a new directory. | |
| __FILE_RES | __dirOpen (__PDIR dir, __CONST __PSTRING name) |
| Opens an existing directory. | |
| __FILE_RES | __dirRead (__PDIR dir, __PFILEINFO fi) |
| Reads a directory entry. | |
Directory functions
| __FILE_RES __dirCreate | ( | __CONST __PSTRING | name | ) |
Creates a new directory.
| name | Name of the directory (string, null-terminated). |
Definition at line 304 of file fat.c.
{
return f_mkdir(name);
}
| __FILE_RES __dirOpen | ( | __PDIR | dir, |
| __CONST __PSTRING | name | ||
| ) |
Opens an existing directory.
From FatFS documentation: The f_opendir function opens an exsisting directory and creates the directory object for subsequent calls. The directory object structure can be discarded at any time without any procedure.
| dir | Pointer to the blank directory object to be opened. |
| name | Pointer to the null-terminated string that specifies the directory name to be opened. |
Definition at line 333 of file fat.c.
{
return f_opendir(dir, name);
}
| __FILE_RES __dirRead | ( | __PDIR | dir, |
| __PFILEINFO | fi | ||
| ) |
Reads a directory entry.
From FatFS documentation: The f_readdir function reads directory entries in sequence. All items in the directory can be read by calling f_readdir function repeatedly. When all directory entries have been read and no item to read, the function returns a null string into f_name[] member without any error. When a null pointer is given to the FileInfo, the read index of the directory object will be rewinded. When LFN feature is enabled, lfname and lfsize in the file information structure must be initialized with valid value prior to use the f_readdir function. The lfname is a pointer to the string buffer to return the long file name. The lfsize is the size of the string buffer in unit of character. If either the size of read buffer or LFN working buffer is insufficient for the LFN or the object has no LFN, a null string will be returned to the LFN read buffer. If the LFN contains any charactrer that cannot be converted to OEM code, a null string will be returned but this is not the case on Unicode API configuration. When lfname is a NULL, nothing of the LFN is returned. When the object has no LFN, any small capitals can be contained in the SFN. When relative path feature is enabled (_FS_RPATH == 1), "." and ".." entries are not filtered out and it will appear in the read entries.
| dir | Pointer to the open directory (__dirOpen() function). |
| fi | Pointer to an __FILEINFO structure to receive the file/directory info. |
Definition at line 368 of file fat.c.
{
return f_readdir(dir, fi);
}