Synesis Software

Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members  

/src/dirent.c File Reference

#include <unixem/unixem.h>
#include <windows.h>
#include <errno.h>
#include <stdlib.h>
#include "dirent.h"

Compounds

struct  dirent_dir
struct  wdirent_dir

Defines

#define FILE_ATTRIBUTE_ERROR   (0xFFFFFFFF)

Functions

DIRopendir (char const *name)
 Returns a pointer to the next directory entry.

int closedir (DIR *dir)
 Closes a directory handle.

void rewinddir (DIR *dir)
 Resets a directory search position.

direntreaddir (DIR *dir)
 Returns a pointer to the next directory entry.


Define Documentation

#define FILE_ATTRIBUTE_ERROR   (0xFFFFFFFF)
 


Function Documentation

int closedir DIR   dir
 

Closes a directory handle.

This function closes a directory handle that was opened with opendir() and releases any resources associated with that directory handle.

Parameters:
dir  The directory handle from which the entries are read
Returns:
0 on success, or -1 to indicate error.

DIR* opendir const char *    name
 

Returns a pointer to the next directory entry.

This function opens the directory named by filename, and returns a directory to be used to in subsequent operations. NULL is returned if name cannot be accessed, or if resources cannot be acquired to process the request.

Parameters:
name  The name of the directory to search
Returns:
The directory handle from which the entries are read or NULL

struct dirent* readdir DIR   dir
 

Returns a pointer to the next directory entry.

This function returns a pointer to the next directory entry, or NULL upon reaching the end of the directory or detecting an invalid seekdir() operation

Parameters:
dir  The directory handle from which the entries are read
Returns:
A dirent structure or NULL

void rewinddir DIR   dir
 

Resets a directory search position.

This function resets the position of the named directory handle to the beginning of the directory.

Parameters:
dir  The directory handle whose position should be reset

UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2005