This library contains functions that allow applications to list the contents of a directory. To use this library, the file system must also be installed and initialized.
Note that not all of the traditional dirent functions are implemented.
For detailed information on the DS80C400 please see the High-Speed Microcontroller User's Guide: DS80C400 Supplement.
Go to the source code of this file.
Data Structures | |
| struct | dirent |
Defines | |
| #define | ROM400_DIRENT_VERSION 2 |
Typedefs | |
| typedef unsigned char * | DIR |
Functions | |
| int | closedir (DIR *dir) |
| Close a directory stream. | |
| DIR * | opendir (const char *name) |
| Open a directory stream. | |
| dirent * | readdir (DIR *dir) |
| Read a directory entry from a directory stream. | |
| void | rewinddir (DIR *dir) |
| Resets the directory stream. | |
| void | seekdir (DIR *dir, long int ptr) |
| Sets the directory stream location. | |
| long int | telldir (DIR *dir) |
| Returns the current location in the directory stream. | |
| unsigned int | dirent_version (void) |
| Returns the version number of this DIRENT library. | |
|
|
Version number associated with this header file. Should be the same as the version number returned by the dirent_version function.
|
|
|
Type definition for a directory structure. This object must not be altered by the application during use. Make sure to call the closedir function when finished with any DIR object. |
|
|
Close a directory stream. Closes the directory stream dir, and frees the resources allocated to it.
|
|
|
Returns the version number of this DIRENT library.
|
|
|
Open a directory stream. Opens a directory stream for the directory name. The argument name should not have leading or trailing slashes. To open the root directory, use the empty string (opendir("");).
|
|
|
Read a directory entry from a directory stream. Reads the current directory entry from the directory stream dir. This function also increments the internal stream counter, so the next call to readdir will read the next directory entry. Before using the returned file name, call fexists to make sure the file still exists. It could have been deleted between the time the directory stream was opened and now, which would yield an invalid result.
|
|
|
Resets the directory stream. Resets the directory stream to the beginning, so the first directory entry is read again.
|
|
||||||||||||
|
Sets the directory stream location. Sets the current 'pointer' into the directory stream to the value ptr. Internally, the directory stream is simply an array of file pointers. This function sets the current index into that array. If ptr is beyond the bounds of the array, the next call to readdir will return NULL;
|
|
|
Returns the current location in the directory stream. Returns the current location in the directory stream. Internally, the directory stream is simply an array of file pointers. This function returns the current index into that array.
|
| Copyright 2005 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |