29 lines
548 B
C
29 lines
548 B
C
// POSIX directory-stream declarations for nt-lite.
|
|
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <ntlite_posix_api.h>
|
|
|
|
#define NAME_MAX 259
|
|
|
|
#define DT_UNKNOWN 0
|
|
#define DT_DIR 4
|
|
#define DT_REG 8
|
|
|
|
typedef struct dirent {
|
|
char d_name[NAME_MAX + 1];
|
|
unsigned char d_type;
|
|
} dirent;
|
|
|
|
typedef struct DIR {
|
|
uint32_t KHandle;
|
|
dirent Current;
|
|
bool Valid;
|
|
} DIR;
|
|
|
|
NTL_POSIX_API DIR* opendir(const char* path);
|
|
NTL_POSIX_API struct dirent* readdir(DIR* directory);
|
|
NTL_POSIX_API int closedir(DIR* directory);
|