Filesystem stuff on Windows

Minor image acquire/present refactor
Unsigned integer limits
Fixed typo in arena push/push copy macro
This commit is contained in:
2025-10-04 11:52:39 +01:00
parent d99da864da
commit 7d55b16c8e
8 changed files with 175 additions and 44 deletions

16
code/os/filesystem.h Normal file
View File

@@ -0,0 +1,16 @@
#if !defined(LD_OS_FILESYSTEM_H_)
#define LD_OS_FILESYSTEM_H_
typedef U32 FS_AccessFlags;
enum {
FS_ACCESS_READ = (1 << 0),
FS_ACCESS_WRITE = (1 << 1)
};
function OS_Handle FS_FileOpen(Str8 path, FS_AccessFlags access);
function void FS_FileClose(OS_Handle file);
function void FS_FileRead(OS_Handle file, void *ptr, U64 size, U64 offset);
function void FS_FileWrite(OS_Handle file, void *ptr, U64 size, U64 offset);
#endif // LD_OS_FILESYSTEM_H_