67 const int ENOMEM = -1;
68 const int EINVAL = -2;
69 const int EDEVFAIL = -3;
70 const int EMOUNTED = -4;
71 const int EACCES = -5;
72 const int EBADFSID = -6;
73 const int ENOVOLUME = -7;
74 const int ENOPATH = -8;
75 const int EEXIST = -9;
76 const int ENAMETOOLONG = -10;
77 const int EOUTOFBOUND = -11;
78 const int EUNFORMAT = -12;
79 const int ENOSPC = -13;
80 const int ENOENT = -14;
81 const int EISDIRECTORY = -15;
82 const int ESHARE = -16;
83 const int EMFILE = -17;
84 const int EBADF = -18;
86 const int ENOTEMPTY = -20;
87 const int ECLUSTERSIZEMISMATCH = -40;
88 const int ESYSTEM = -99;
127 return ((date >> 9) & 0b1111111) + 1980;
137 return (date >> 5) & 0b1111;
147 return date & 0b11111;
157 return (time >> 11) & 0b11111;
167 return (time >> 5) & 0b111111;
179 return (time & 0b11111) * 2;
299 EntryTypeDirectory = 0x5
353 int findFirst(
const wchar_t *path,
int *findHandle,
wchar_t *name,
struct findInfo *findInfoBuf);
389 int getAddr(
int fd,
int offset,
const void **addr);
401 int lseek(
int fd,
int offset,
int whence);
423 int open(
const char *path,
int flags);
438 int read(
int fd,
void *buf,
int count);
457 int rename(
const char *oldPath,
const char *newPath);
479 int write(
int fd,
const void *buf,
int count);
int getAddr(int fd, int offset, const void **addr)
int findFirst(const wchar_t *path, int *findHandle, wchar_t *name, struct findInfo *findInfoBuf)
constexpr uint16_t statTimeSecond(uint16_t time)
Definition: file.hpp:178
int fstat(int fd, struct stat *buf)
int findNext(int findHandle, wchar_t *name, struct findInfo *findInfoBuf)
int remove(const char *path)
int write(int fd, const void *buf, int count)
int stat(const char *path, struct stat *buf)
int rename(const char *oldPath, const char *newPath)
constexpr uint16_t statDateYear(uint16_t date)
Definition: file.hpp:126
int findClose(int findHandle)
int open(const char *path, int flags)
constexpr uint16_t statDateDay(uint16_t date)
Definition: file.hpp:146
constexpr uint16_t statDateMonth(uint16_t date)
Definition: file.hpp:136
constexpr uint16_t statTimeHour(uint16_t time)
Definition: file.hpp:156
constexpr uint16_t statTimeMinute(uint16_t time)
Definition: file.hpp:166
int read(int fd, void *buf, int count)
int lseek(int fd, int offset, int whence)
int mkdir(const char *path)
const int SEEK_END
Set the file offset to the end of the file, plus offset bytes.
Definition: file.hpp:101
const int SEEK_CUR
Set the file offset to the current position, plus offset bytes.
Definition: file.hpp:99
const int SEEK_SET
Set the file offset to offset.
Definition: file.hpp:97
const int OPEN_CREATE
Create the file, if it does not already exist.
Definition: file.hpp:115
const int OPEN_WRITE
Open the file as writable.
Definition: file.hpp:113
const int OPEN_READ
Open the file as readable.
Definition: file.hpp:111
const int OPEN_APPEND
Opens the file with the file offset set to the end of the file.
Definition: file.hpp:117
uint32_t size
Definition: file.hpp:308
enum findInfo::@0 type
The type of entry which was located.
uint32_t fileSize
Definition: file.hpp:254
uint16_t lastModifiedDate
Definition: file.hpp:272
uint16_t creationTime
Definition: file.hpp:266
uint16_t creationDate
Definition: file.hpp:260
uint16_t lastModifiedTime
Definition: file.hpp:278
uint16_t lastAccessedDate
Definition: file.hpp:286