ApertureOS
Data Structures | Typedefs | Enumerations | Functions
filesystem.h File Reference
#include "types.h"
#include "managers.h"
#include "drivers.h"
#include "kmalloc.h"
Include dependency graph for filesystem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Filesystem_DirEntry
 

Typedefs

typedef uint8_t(* ReadFunc) (uint64_t, uint32_t, uint16_t *)
 
typedef uint8_t(* WriteFunc) (uint64_t, uint32_t, uint16_t *)
 

Enumerations

enum  SupportedFilesystems { NONE = 0, EXT2 = 1 }
 
enum  FILE_IO_FLAGS { O_RDONLY = 0, O_RD_WR = 1, O_APPED = 2, O_CREAT = 4 }
 
enum  FILE_IO_WHENCE { SEEK_SET = 0, SEEK_CUR = 1, SEEK_END = 2 }
 

Functions

void Filesystem_Setup ()
 
UID Filesystem_OpenFile (const char *filename, int flags, int perms)
 
uint8_t Filesystem_CloseFile (UID fd)
 
uint64_t Filesystem_SeekFile (UID fd, uint64_t offset, int whence)
 
uint8_t Filesystem_DeleteFile (const char *file)
 
uint8_t Filesystem_RenameFile (const char *orig_name, const char *new_name)
 
UID Filesystem_OpenDir (const char *filename)
 
uint8_t Filesystem_ReadDir (UID dd, Filesystem_DirEntry *dir)
 
uint8_t Filesystem_CloseDir (UID fd)
 
uint8_t Filesystem_MakeDir (const char *path)
 
uint8_t Filesystem_DeleteDir (const char *path)
 
void * Filesystem_FindDescriptorFromPath (const char *path)
 
void * Filesystem_FindDescriptorFromUID (const UID id)
 
uint8_t Filesystem_Close (UID fd)
 
UID Filesystem_RegisterDescriptor (const char *target, ReadFunc *read, WriteFunc *write, SupportedFilesystems fs)
 
uint8_t Filesystem_UnregisterDescriptor (UID id)
 

Typedef Documentation

typedef uint8_t(* ReadFunc) (uint64_t, uint32_t, uint16_t *)
typedef uint8_t(* WriteFunc) (uint64_t, uint32_t, uint16_t *)

Enumeration Type Documentation

Enumerator
O_RDONLY 
O_RD_WR 
O_APPED 
O_CREAT 
Enumerator
SEEK_SET 
SEEK_CUR 
SEEK_END 
Enumerator
NONE 
EXT2 

Function Documentation

uint8_t Filesystem_Close ( UID  fd)
uint8_t Filesystem_CloseDir ( UID  fd)
uint8_t Filesystem_CloseFile ( UID  fd)
uint8_t Filesystem_DeleteDir ( const char *  path)
uint8_t Filesystem_DeleteFile ( const char *  file)
void* Filesystem_FindDescriptorFromPath ( const char *  path)
void* Filesystem_FindDescriptorFromUID ( const UID  id)
uint8_t Filesystem_MakeDir ( const char *  path)
UID Filesystem_OpenDir ( const char *  filename)
UID Filesystem_OpenFile ( const char *  filename,
int  flags,
int  perms 
)
uint8_t Filesystem_ReadDir ( UID  dd,
Filesystem_DirEntry dir 
)
UID Filesystem_RegisterDescriptor ( const char *  target,
ReadFunc read,
WriteFunc write,
SupportedFilesystems  fs 
)
uint8_t Filesystem_RenameFile ( const char *  orig_name,
const char *  new_name 
)
uint64_t Filesystem_SeekFile ( UID  fd,
uint64_t  offset,
int  whence 
)
void Filesystem_Setup ( )
uint8_t Filesystem_UnregisterDescriptor ( UID  id)