Ruby: win32/dir.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Functions
dir.h File Reference
`#include <stdint.h>`
`#include <esent.h>`
`#include "ruby/encoding.h"`

Go to the source code of this file.

## Data Structures
struct | direct
struct | DIR

## Macros
#define | DT_UNKNOWN 0
#define | DT_DIR (S_IFDIR>>12)
#define | DT_REG (S_IFREG>>12)
#define | DT_LNK 10
#define | opendir(s) rb_w32_uopendir((s))
#define | readdir(d) rb_w32_ureaddir((d))
#define | telldir(d) rb_w32_telldir((d))
#define | seekdir(d, l) rb_w32_seekdir((d), (l))
#define | rewinddir(d) rb_w32_rewinddir((d))
#define | closedir(d) rb_w32_closedir((d))
#define | getcwd(b, s) rb_w32_ugetcwd(b, s)

## Functions
DIR * | rb_w32_opendir (const char *)
DIR * | rb_w32_uopendir (const char *)
struct direct * | rb_w32_readdir (DIR *, rb_encoding *)
struct direct * | rb_w32_ureaddir (DIR *)
long | rb_w32_telldir (DIR *)
void | rb_w32_seekdir (DIR *, long)
void | rb_w32_rewinddir (DIR *)
void | rb_w32_closedir (DIR *)
char * | rb_w32_ugetcwd (char *, int)

## Macro Definition Documentation

## ◆ closedir

#define closedir | ( |  | d | ) | rb_w32_closedir((d))

Definition at line 47 of file dir.h.

## ◆ DT_DIR

#define DT_DIR (S_IFDIR>>12)

Definition at line 8 of file dir.h.

## ◆ DT_LNK

#define DT_LNK 10

Definition at line 10 of file dir.h.

## ◆ DT_REG

#define DT_REG (S_IFREG>>12)

Definition at line 9 of file dir.h.

## ◆ DT_UNKNOWN

#define DT_UNKNOWN 0

Definition at line 7 of file dir.h.

## ◆ getcwd

#define getcwd | ( |  | b,
|  |  | s
| ) |  | rb_w32_ugetcwd(b, s)

Definition at line 48 of file dir.h.

## ◆ opendir

#define opendir | ( |  | s | ) | rb_w32_uopendir((s))

Definition at line 42 of file dir.h.

## ◆ readdir

#define readdir | ( |  | d | ) | rb_w32_ureaddir((d))

Definition at line 43 of file dir.h.

## ◆ rewinddir

#define rewinddir | ( |  | d | ) | rb_w32_rewinddir((d))

Definition at line 46 of file dir.h.

## ◆ seekdir

#define seekdir | ( |  | d,
|  |  | l
| ) |  | rb_w32_seekdir((d), (l))

Definition at line 45 of file dir.h.

## ◆ telldir

#define telldir | ( |  | d | ) | rb_w32_telldir((d))

Definition at line 44 of file dir.h.

## Function Documentation

## ◆ rb_w32_closedir()

void rb_w32_closedir | ( | DIR * | dirp | ) |

Definition at line 2441 of file win32.c.

References DIR::bits, direct::d_altname, direct::d_name, DIR::dirstr, free, and DIR::start.

## ◆ rb_w32_opendir()

DIR * rb_w32_opendir | ( | const char * | filename | ) |

Definition at line 2203 of file win32.c.

References filecp_to_wstr, free, and NULL.

## ◆ rb_w32_readdir()

struct direct * rb_w32_readdir | ( | DIR * | dirp,
|  | rb_encoding * | enc
| ) |  |

Definition at line 2374 of file win32.c.

References ENCINDEX_ASCII, ENCINDEX_UTF_8, filecp, and rb_enc_to_index().

## ◆ rb_w32_rewinddir()

void rb_w32_rewinddir | ( | DIR * | dirp | ) |

Definition at line 2429 of file win32.c.

References DIR::curr, DIR::loc, and DIR::start.

Referenced by rb_w32_seekdir().

## ◆ rb_w32_seekdir()

void rb_w32_seekdir | ( | DIR * | dirp,
|  | long | loc
| ) |  |

Definition at line 2414 of file win32.c.

References DIR::curr, DIR::loc, and rb_w32_rewinddir().

## ◆ rb_w32_telldir()

long rb_w32_telldir | ( | DIR * | dirp | ) |

Definition at line 2403 of file win32.c.

References DIR::loc.

## ◆ rb_w32_ugetcwd()

char * rb_w32_ugetcwd | ( | char * | buffer,
|  | int | size
| ) |  |

Definition at line 4794 of file win32.c.

## ◆ rb_w32_uopendir()

DIR * rb_w32_uopendir | ( | const char * | filename | ) |

Definition at line 2216 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_ureaddir()

struct direct * rb_w32_ureaddir | ( | DIR * | dirp | ) |

Definition at line 2391 of file win32.c.