Working on rendering
This commit is contained in:
34
src/basic/filesystem.h
Normal file
34
src/basic/filesystem.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include "../basic/basic.h"
|
||||
|
||||
struct FileIter {
|
||||
bool is_valid;
|
||||
bool is_directory;
|
||||
String absolute_path;
|
||||
String relative_path;
|
||||
String filename;
|
||||
|
||||
String path;
|
||||
Allocator allocator;
|
||||
Arena *arena;
|
||||
TempArena temp;
|
||||
union {
|
||||
struct Win32_FileIter *w32;
|
||||
void *dir;
|
||||
};
|
||||
};
|
||||
|
||||
String ReadFile(Allocator arena, String path);
|
||||
String GetAbsolutePath(Allocator arena, String relative);
|
||||
bool IsValid(const FileIter &it);
|
||||
void Advance(FileIter *it);
|
||||
FileIter IterateFiles(Allocator allocator, String path);
|
||||
bool InitOS();
|
||||
|
||||
struct Process {
|
||||
bool is_valid;
|
||||
char platform[32];
|
||||
};
|
||||
|
||||
Process RunEx(String cmd);
|
||||
int Wait(Process *process);
|
||||
Reference in New Issue
Block a user