Luna/kernel/include/fs/VFS.h
2022-10-09 21:19:22 +02:00

26 lines
525 B
C++

#pragma once
#include <stdint.h>
namespace VFS
{
struct Node;
typedef int32_t (*node_read)(Node*, uint32_t, uint32_t, char*);
typedef Node* (*node_finddir)(Node*, const char*);
struct Node
{
char name[64];
uint64_t inode;
uint64_t length;
node_read read_func;
node_finddir find_func;
};
int32_t read(Node* node, uint32_t offset, uint32_t length, char* buffer);
Node* open(const char* filename);
void mount_root(Node* root);
Node* root();
}