XgFSDir


Functions

int closedir (DIR *dir)
 Close a directory stream.
DIRopendir (CONST char *name)
 Open a directory stream.
direntreaddir (DIR *dir)
 Get the next directory entry.


Function Documentation

int closedir ( DIR dir  ) 

Close a directory stream.

Closes the given directory stream and frees any allocated memory.

Parameters:
dir Pointer to the directory stream.
Returns:
0 on success. On failure, -1 is returned and the global variable errno is set to indicate the error.

DIR* opendir ( CONST char *  name  ) 

Open a directory stream.

Opens a directory and associates a directory stream with it.

Parameters:
name Pathname of the directory. Must be the full pathname including the device, because Nut/OS doesn't support relative paths.
Returns:
A pointer used to identify the directory stream in subsequent operations. NULL is returned if the directory cannot be accessed, or if it cannot allocate enough memory.

struct dirent* readdir ( DIR dir  ) 

Get the next directory entry.

Parameters:
dir Pointer to the directory stream.
Returns:
A pointer to the next directory entry. It returns NULL upon reaching the end of the directory.


Generated on Tue Jan 23 21:12:31 2007 for BTnut System Software by doxygen 1.4.7