Classes | Macros | Typedefs | Functions
dirent.h File Reference
#include <windows.h>
#include <cerrno>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cwchar>
#include <sys/stat.h>
#include <sys/types.h>
Include dependency graph for dirent.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _WDIR
 
struct  _wdirent
 
struct  DIR
 
struct  dirent
 

Macros

#define _D_ALLOC_NAMLEN(p)   ((PATH_MAX)+1)
 
#define _D_EXACT_NAMLEN(p)   ((p)->d_namlen)
 
#define _DIRENT_HAVE_D_NAMLEN
 
#define _DIRENT_HAVE_D_TYPE
 
#define DT_BLK   S_IFBLK
 
#define DT_CHR   S_IFCHR
 
#define DT_DIR   S_IFDIR
 
#define DT_FIFO   S_IFIFO
 
#define DT_LNK   S_IFLNK
 
#define DT_REG   S_IFREG
 
#define DT_SOCK   S_IFSOCK
 
#define DT_UNKNOWN   0
 
#define DTTOIF(type)   (type)
 
#define FILE_ATTRIBUTE_DEVICE   0x40
 
#define FILENAME_MAX   MAX_PATH
 
#define IFTODT(mode)   ((mode) & S_IFMT)
 
#define NAME_MAX   FILENAME_MAX
 
#define PATH_MAX   MAX_PATH
 
#define S_IEXEC   _S_IEXEC
 
#define S_IFBLK   0
 
#define S_IFCHR   _S_IFCHR
 
#define S_IFDIR   _S_IFDIR
 
#define S_IFFIFO   _S_IFFIFO
 
#define S_IFIFO   _S_IFIFO
 
#define S_IFLNK   0
 
#define S_IFMT   _S_IFMT
 
#define S_IFREG   _S_IFREG
 
#define S_IFSOCK   0
 
#define S_IREAD   _S_IREAD
 
#define S_IRGRP   0
 
#define S_IROTH   0
 
#define S_IRUSR   S_IREAD
 
#define S_ISBLK(mode)   (((mode) & S_IFMT) == S_IFBLK)
 
#define S_ISCHR(mode)   (((mode) & S_IFMT) == S_IFCHR)
 
#define S_ISDIR(mode)   (((mode) & S_IFMT) == S_IFDIR)
 
#define S_ISFIFO(mode)   (((mode) & S_IFMT) == S_IFIFO)
 
#define S_ISLNK(mode)   (((mode) & S_IFMT) == S_IFLNK)
 
#define S_ISREG(mode)   (((mode) & S_IFMT) == S_IFREG)
 
#define S_ISSOCK(mode)   (((mode) & S_IFMT) == S_IFSOCK)
 
#define S_IWGRP   0
 
#define S_IWOTH   0
 
#define S_IWRITE   _S_IWRITE
 
#define S_IWUSR   S_IWRITE
 
#define S_IXGRP   0
 
#define S_IXOTH   0
 
#define S_IXUSR   0
 
#define wclosedir   _wclosedir
 
#define WDIR   _WDIR
 
#define wdirent   _wdirent
 
#define WIN32_LEAN_AND_MEAN
 
#define wopendir   _wopendir
 
#define wreaddir   _wreaddir
 
#define wrewinddir   _wrewinddir
 

Typedefs

typedef struct _WDIR _WDIR
 
typedef struct _wdirent _wdirent
 
typedef struct DIR DIR
 
typedef struct dirent dirent
 

Functions

static int _wclosedir (_WDIR *dirp)
 
static _WDIR_wopendir (const wchar_t *dirname)
 
static struct _wdirent_wreaddir (_WDIR *dirp)
 
static int _wreaddir_r (_WDIR *dirp, struct _wdirent *entry, struct _wdirent **result)
 
static void _wrewinddir (_WDIR *dirp)
 
static int alphasort (const struct dirent **a, const struct dirent **b)
 
static int closedir (DIR *dirp)
 
static WIN32_FIND_DATAW * dirent_first (_WDIR *dirp)
 
static int dirent_mbstowcs_s (size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count)
 
static WIN32_FIND_DATAW * dirent_next (_WDIR *dirp)
 
static void dirent_set_errno (int error)
 
static int dirent_wcstombs_s (size_t *pReturnValue, char *mbstr, size_t sizeInBytes, const wchar_t *wcstr, size_t count)
 
static DIRopendir (const char *dirname)
 
static struct direntreaddir (DIR *dirp)
 
static int readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
 
static void rewinddir (DIR *dirp)
 
static int scandir (const char *dirname, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compare)(const struct dirent **, const struct dirent **))
 
static int versionsort (const struct dirent **a, const struct dirent **b)
 

Macro Definition Documentation

◆ _D_ALLOC_NAMLEN

#define _D_ALLOC_NAMLEN (   p)    ((PATH_MAX)+1)

Definition at line 212 of file dirent.h.

◆ _D_EXACT_NAMLEN

#define _D_EXACT_NAMLEN (   p)    ((p)->d_namlen)

Definition at line 209 of file dirent.h.

◆ _DIRENT_HAVE_D_NAMLEN

#define _DIRENT_HAVE_D_NAMLEN

Definition at line 43 of file dirent.h.

◆ _DIRENT_HAVE_D_TYPE

#define _DIRENT_HAVE_D_TYPE

Definition at line 40 of file dirent.h.

◆ DT_BLK

#define DT_BLK   S_IFBLK

Definition at line 173 of file dirent.h.

◆ DT_CHR

#define DT_CHR   S_IFCHR

Definition at line 172 of file dirent.h.

◆ DT_DIR

#define DT_DIR   S_IFDIR

Definition at line 169 of file dirent.h.

◆ DT_FIFO

#define DT_FIFO   S_IFIFO

Definition at line 170 of file dirent.h.

◆ DT_LNK

#define DT_LNK   S_IFLNK

Definition at line 174 of file dirent.h.

◆ DT_REG

#define DT_REG   S_IFREG

Definition at line 168 of file dirent.h.

◆ DT_SOCK

#define DT_SOCK   S_IFSOCK

Definition at line 171 of file dirent.h.

◆ DT_UNKNOWN

#define DT_UNKNOWN   0

Definition at line 167 of file dirent.h.

◆ DTTOIF

#define DTTOIF (   type)    (type)

Definition at line 178 of file dirent.h.

◆ FILE_ATTRIBUTE_DEVICE

#define FILE_ATTRIBUTE_DEVICE   0x40

Definition at line 47 of file dirent.h.

◆ FILENAME_MAX

#define FILENAME_MAX   MAX_PATH

Definition at line 160 of file dirent.h.

◆ IFTODT

#define IFTODT (   mode)    ((mode) & S_IFMT)

Definition at line 177 of file dirent.h.

◆ NAME_MAX

#define NAME_MAX   FILENAME_MAX

Definition at line 163 of file dirent.h.

◆ PATH_MAX

#define PATH_MAX   MAX_PATH

Definition at line 157 of file dirent.h.

◆ S_IEXEC

#define S_IEXEC   _S_IEXEC

Definition at line 87 of file dirent.h.

◆ S_IFBLK

#define S_IFBLK   0

Definition at line 97 of file dirent.h.

◆ S_IFCHR

#define S_IFCHR   _S_IFCHR

Definition at line 62 of file dirent.h.

◆ S_IFDIR

#define S_IFDIR   _S_IFDIR

Definition at line 57 of file dirent.h.

◆ S_IFFIFO

#define S_IFFIFO   _S_IFFIFO

Definition at line 67 of file dirent.h.

◆ S_IFIFO

#define S_IFIFO   _S_IFIFO

Definition at line 92 of file dirent.h.

◆ S_IFLNK

#define S_IFLNK   0

Definition at line 102 of file dirent.h.

◆ S_IFMT

#define S_IFMT   _S_IFMT

Definition at line 52 of file dirent.h.

◆ S_IFREG

#define S_IFREG   _S_IFREG

Definition at line 72 of file dirent.h.

◆ S_IFSOCK

#define S_IFSOCK   0

Definition at line 107 of file dirent.h.

◆ S_IREAD

#define S_IREAD   _S_IREAD

Definition at line 77 of file dirent.h.

◆ S_IRGRP

#define S_IRGRP   0

Definition at line 127 of file dirent.h.

◆ S_IROTH

#define S_IROTH   0

Definition at line 142 of file dirent.h.

◆ S_IRUSR

#define S_IRUSR   S_IREAD

Definition at line 112 of file dirent.h.

◆ S_ISBLK

#define S_ISBLK (   mode)    (((mode) & S_IFMT) == S_IFBLK)

Definition at line 205 of file dirent.h.

◆ S_ISCHR

#define S_ISCHR (   mode)    (((mode) & S_IFMT) == S_IFCHR)

Definition at line 202 of file dirent.h.

◆ S_ISDIR

#define S_ISDIR (   mode)    (((mode) & S_IFMT) == S_IFDIR)

Definition at line 190 of file dirent.h.

◆ S_ISFIFO

#define S_ISFIFO (   mode)    (((mode) & S_IFMT) == S_IFIFO)

Definition at line 187 of file dirent.h.

◆ S_ISLNK

#define S_ISLNK (   mode)    (((mode) & S_IFMT) == S_IFLNK)

Definition at line 196 of file dirent.h.

◆ S_ISREG

#define S_ISREG (   mode)    (((mode) & S_IFMT) == S_IFREG)

Definition at line 193 of file dirent.h.

◆ S_ISSOCK

#define S_ISSOCK (   mode)    (((mode) & S_IFMT) == S_IFSOCK)

Definition at line 199 of file dirent.h.

◆ S_IWGRP

#define S_IWGRP   0

Definition at line 132 of file dirent.h.

◆ S_IWOTH

#define S_IWOTH   0

Definition at line 147 of file dirent.h.

◆ S_IWRITE

#define S_IWRITE   _S_IWRITE

Definition at line 82 of file dirent.h.

◆ S_IWUSR

#define S_IWUSR   S_IWRITE

Definition at line 117 of file dirent.h.

◆ S_IXGRP

#define S_IXGRP   0

Definition at line 137 of file dirent.h.

◆ S_IXOTH

#define S_IXOTH   0

Definition at line 152 of file dirent.h.

◆ S_IXUSR

#define S_IXUSR   0

Definition at line 122 of file dirent.h.

◆ wclosedir

#define wclosedir   _wclosedir

Definition at line 321 of file dirent.h.

◆ WDIR

#define WDIR   _WDIR

Definition at line 318 of file dirent.h.

◆ wdirent

#define wdirent   _wdirent

Definition at line 317 of file dirent.h.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 26 of file dirent.h.

◆ wopendir

#define wopendir   _wopendir

Definition at line 319 of file dirent.h.

◆ wreaddir

#define wreaddir   _wreaddir

Definition at line 320 of file dirent.h.

◆ wrewinddir

#define wrewinddir   _wrewinddir

Definition at line 322 of file dirent.h.

Typedef Documentation

◆ _WDIR

typedef struct _WDIR _WDIR

Definition at line 258 of file dirent.h.

◆ _wdirent

typedef struct _wdirent _wdirent

Definition at line 240 of file dirent.h.

◆ DIR

typedef struct DIR DIR

Definition at line 286 of file dirent.h.

◆ dirent

typedef struct dirent dirent

Definition at line 280 of file dirent.h.

Function Documentation

◆ _wclosedir()

static int _wclosedir ( _WDIR dirp)
static

Definition at line 537 of file dirent.h.

◆ _wopendir()

static _WDIR * _wopendir ( const wchar_t *  dirname)
static

Definition at line 352 of file dirent.h.

◆ _wreaddir()

static struct _wdirent * _wreaddir ( _WDIR dirp)
static

Definition at line 453 of file dirent.h.

◆ _wreaddir_r()

static int _wreaddir_r ( _WDIR dirp,
struct _wdirent entry,
struct _wdirent **  result 
)
static

Definition at line 475 of file dirent.h.

◆ _wrewinddir()

static void _wrewinddir ( _WDIR dirp)
static

Definition at line 570 of file dirent.h.

◆ alphasort()

static int alphasort ( const struct dirent **  a,
const struct dirent **  b 
)
static

Definition at line 1018 of file dirent.h.

◆ closedir()

static int closedir ( DIR dirp)
static

Definition at line 843 of file dirent.h.

◆ dirent_first()

static WIN32_FIND_DATAW * dirent_first ( _WDIR dirp)
static

Definition at line 586 of file dirent.h.

◆ dirent_mbstowcs_s()

static int dirent_mbstowcs_s ( size_t *  pReturnValue,
wchar_t *  wcstr,
size_t  sizeInWords,
const char *  mbstr,
size_t  count 
)
static

Definition at line 1035 of file dirent.h.

◆ dirent_next()

static WIN32_FIND_DATAW * dirent_next ( _WDIR dirp)
static

Definition at line 637 of file dirent.h.

◆ dirent_set_errno()

static void dirent_set_errno ( int  error)
static

Definition at line 1139 of file dirent.h.

◆ dirent_wcstombs_s()

static int dirent_wcstombs_s ( size_t *  pReturnValue,
char *  mbstr,
size_t  sizeInBytes,
const wchar_t *  wcstr,
size_t  count 
)
static

Definition at line 1087 of file dirent.h.

◆ opendir()

static DIR * opendir ( const char *  dirname)
static

Definition at line 676 of file dirent.h.

◆ readdir()

static struct dirent * readdir ( DIR dirp)
static

Definition at line 732 of file dirent.h.

◆ readdir_r()

static int readdir_r ( DIR dirp,
struct dirent entry,
struct dirent **  result 
)
static

Definition at line 754 of file dirent.h.

◆ rewinddir()

static void rewinddir ( DIR dirp)
static

Definition at line 870 of file dirent.h.

◆ scandir()

static int scandir ( const char *  dirname,
struct dirent ***  namelist,
int(*)(const struct dirent *)  filter,
int(*)(const struct dirent **, const struct dirent **)  compare 
)
static

Definition at line 881 of file dirent.h.

◆ versionsort()

static int versionsort ( const struct dirent **  a,
const struct dirent **  b 
)
static

Definition at line 1026 of file dirent.h.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:02