files
kolibrios/programs/develop/ktcc/libc.obj/include/sys/dirent.h
Andrew 8a2a454ba9
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 20s
Build system / Build (pull_request) Failing after 40s
develop/ktcc: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and include paths.
- These changes also update the CI build files in `.gitea/workflows/`.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-24 12:07:42 +01:00

34 lines
670 B
C

/* Copyright (C) 2021 Logaev Maxim (turbocat2001), GPLv2 */
#ifndef _DIRENT_H_
#define _DIRENT_H_
#include <limits.h>
#include <stddef.h>
#define IS_FOLDER 16
#define IS_FILE 0
typedef unsigned ino_t;
struct dirent {
ino_t d_ino; //File serial number.
char d_name[PATH_MAX]; // Name of entry.
unsigned d_type;
};
typedef struct {
struct dirent* objs;
ino_t pos;
ino_t num_objs;
} DIR;
DLLAPI int closedir(DIR* dir);
DLLAPI DIR* opendir(const char* path);
DLLAPI struct dirent* readdir(DIR*);
DLLAPI void rewinddir(DIR* dir);
DLLAPI void seekdir(DIR* dir, unsigned pos);
DLLAPI unsigned telldir(DIR* dir);
#endif // _DIRENT_H_