UNIX compatible directory read functions. More...
Functions | |
DIR * | opendir (const char *name) |
Open a directory stream. | |
int | closedir (DIR *dir) |
Close a directory stream. | |
struct dirent * | readdir (DIR *dir) |
Get the next directory entry. |
UNIX compatible directory read functions.
DIR* opendir | ( | const char * | name | ) |
Open a directory stream.
Opens a directory and associates a directory stream with it.
name | Pathname of the directory. Must be the full pathname including the device, because Nut/OS doesn't support relative paths. |
References _dirdesc::dd_buf, _dirdesc::dd_len, _NUTDEVICE::dev_ioctl, ENODEV, ENOMEM, errno, free(), FS_DIR_OPEN, malloc(), memset(), NutDeviceLookup(), strcpy(), and strlen().
Referenced by NutFtpTransferDirectoryOptions().
int closedir | ( | DIR * | dir | ) |
Close a directory stream.
Closes the given directory stream and frees any allocated memory.
dir | Pointer to the directory stream. |
References _dirdesc::dd_buf, _dirdesc::dd_fd, _NUTDEVICE::dev_ioctl, free(), FS_DIR_CLOSE, and _NUTFILE::nf_dev.
Referenced by NutFtpTransferDirectoryOptions().
Get the next directory entry.
dir | Pointer to the directory stream. |
References _dirdesc::dd_buf, _dirdesc::dd_fd, _NUTDEVICE::dev_ioctl, FS_DIR_READ, and _NUTFILE::nf_dev.
Referenced by NutFtpTransferDirectoryOptions().