Module libc/dirent

libc/dirent

C11 <dirent.h> — directory entry operations.

Types

DIR type-alias
DIR
dirent type-alias
dirent

Functions

opendir function
fn(name : *(char)) -> Option(*(FILE))

Parameters

NameTypeNotes
name*(char)

Returns: Option(*(FILE))

closedir function
fn(dirp : *(DIR)) -> int

Parameters

NameTypeNotes
dirp*(DIR)

Returns: int

readdir function
fn(dirp : *(DIR)) -> Option(*(FILE))

Parameters

NameTypeNotes
dirp*(DIR)

Returns: Option(*(FILE))

rewinddir function
fn(dirp : *(DIR)) -> unit

Parameters

NameTypeNotes
dirp*(DIR)

Returns: unit

Constants

DT_UNKNOWN constant u8

Value: DT_UNKNOWN

DT_FIFO constant u8

Value: DT_FIFO

DT_CHR constant u8

Value: DT_CHR

DT_DIR constant u8

Value: DT_DIR

DT_BLK constant u8

Value: DT_BLK

DT_REG constant u8

Value: DT_REG

DT_LNK constant u8

Value: DT_LNK

DT_SOCK constant u8

Value: DT_SOCK

DT_WHT constant u8

Value: DT_WHT