Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

posix/directory.h File Reference

#include <sys/types.h>
#include <dirent.h>

Go to the source code of this file.

Classes

struct  DIRECTORYDATASTRUCT

Functions

CHIPCARD_API DIRECTORYDATADirectory_new ()
CHIPCARD_API void Directory_free (DIRECTORYDATA *d)
CHIPCARD_API int Directory_Open (DIRECTORYDATA *d, const char *n)
CHIPCARD_API int Directory_Close (DIRECTORYDATA *d)
CHIPCARD_API int Directory_Read (DIRECTORYDATA *d, char *buffer, int len)
CHIPCARD_API int Directory_Rewind (DIRECTORYDATA *d)

Variables

typedefCHIPCARD_API struct
DIRECTORYDATASTRUCT 
DIRECTORYDATA


Function Documentation

CHIPCARD_API int Directory_Close DIRECTORYDATA d  ) 
 

Closes a previously opened directory.

Author:
Martin Preuss<martin@libchipcard.de>
Returns:
0 if ok, !=0 on error
Parameters:
d pointer to a directory data structure. This should be created by calling Directory_new().

CHIPCARD_API void Directory_free DIRECTORYDATA d  ) 
 

Destructor

CHIPCARD_API DIRECTORYDATA* Directory_new  ) 
 

Constructor.

CHIPCARD_API int Directory_Open DIRECTORYDATA d,
const char *  n
 

Opens a directory. This allows calling "Directory_Read" to succeed.

Author:
Martin Preuss<martin@libchipcard.de>
Returns:
0 if ok, !=0 on error
Parameters:
d pointer to a directory data structure. This should be created by calling Directory_new().
n path and name of the directory to open

CHIPCARD_API int Directory_Read DIRECTORYDATA d,
char *  buffer,
int  len
 

Reads the next entry from a directory and stores the name of that entry in the given buffer. The entry returned is relative to the open directory.

Author:
Martin Preuss<martin@libchipcard.de>
Returns:
0 if ok, !=0 on error
Parameters:
d pointer to a directory data structure. This should be created by calling Directory_new().
buffer pointer to a buffer to receive the name
len size of the buffer

CHIPCARD_API int Directory_Rewind DIRECTORYDATA d  ) 
 

Rewinds the internal pointers, so that the next call to

Author:
Martin Preuss<martin@libchipcard.de> Directory_Read will return the first entry of the open directory.
Returns:
0 if ok, !=0 on error
Parameters:
d pointer to a directory data structure. This should be created by calling Directory_new().


Variable Documentation

typedefCHIPCARD_API struct DIRECTORYDATASTRUCT DIRECTORYDATA
 


Generated on Mon Jun 6 18:17:40 2005 for libchipcard by  doxygen 1.4.2