import "base/types" import "unistd" public [name="c"] public typedef ino_t = dword struct dir dummy : int end struct dirent d_ino : ino_t d_off : off_t d_reclen : word d_type : byte d_name : [256] char end enum dirent_type DT_UNKNOWN = 0 DT_FIFO = 1 DT_CHR = 2 DT_DIR = 4 DT_BLK = 6 DT_REG = 8 DT_LNK = 10 DT_SOCK = 12 DT_WHT = 14 end import func opendir (string): dir import func closedir (dir): int import func readdir (dir): dirent import func rewinddir (dir): void equ MAXNAMLEN = 255 end