IBNOS
Classes | Macros | Functions | Variables
filesystem.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <process/object.h>
#include <util/list.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.

Classes

struct  directory
 
struct  file
 
struct  openedDirectory
 
struct  openedFile
 
struct  tarHeader
 

Macros

#define TAR_TYPE_FILE   '0'
 
#define TAR_TYPE_HARDLINK   '1'
 
#define TAR_TYPE_SYMLINK   '2'
 
#define TAR_TYPE_DEVICE   '3'
 
#define TAR_TYPE_BLOCKDEV   '4'
 
#define TAR_TYPE_DIRECTORY   '5'
 
#define TAR_TYPE_NAMEDPIPE   '6'
 

Functions

struct tarHeader __attribute__ ((packed))
 
struct directorydirectoryCreate (struct directory *parent, char *name, uint32_t nameLength)
 Creates a new kernel directory object. More...
 
struct filefileCreate (struct directory *parent, char *name, uint32_t nameLength, uint8_t *staticBuffer, uint32_t staticSize)
 Creates a new kernel file object. More...
 
struct openedFilefileOpen (struct file *file)
 Creates a new kernel openedFile object. More...
 
struct openedDirectorydirectoryOpen (struct directory *directory)
 Creates a new kernel openedDirectory object. More...
 
void fileSystemInit (void *addr, uint32_t length)
 Initializes the root file system. More...
 
struct directoryfileSystemIsValidDirectory (struct object *obj)
 Checks if a given object is of the type directory and casts it if possible. More...
 
struct filefileSystemIsValidFile (struct object *obj)
 Checks if a given object is of the type file and casts it if possible. More...
 
struct directoryfileSystemGetRoot ()
 Returns a reference to the root node of the file system. More...
 
struct directoryfileSystemSearchDirectory (struct directory *directory, char *path, uint32_t pathLength, bool create)
 Opens or creates a directory. More...
 
struct filefileSystemSearchFile (struct directory *directory, char *path, uint32_t pathLength, bool create)
 Opens or creates a file. More...
 

Variables

char name [100]
 
char mode [8]
 
char uid [8]
 
char gid [8]
 
char size [12]
 
char mtime [12]
 
char checksum [8]
 
char typeflag
 
char linkname [100]
 
char magic [6]
 
char version [2]
 
char uname [32]
 
char gname [32]
 
char devmajor [8]
 
char devminor [8]
 
char prefix [155]
 
char pad [12]
 

Macro Definition Documentation

◆ TAR_TYPE_BLOCKDEV

#define TAR_TYPE_BLOCKDEV   '4'

Definition at line 109 of file filesystem.h.

◆ TAR_TYPE_DEVICE

#define TAR_TYPE_DEVICE   '3'

Definition at line 108 of file filesystem.h.

◆ TAR_TYPE_DIRECTORY

#define TAR_TYPE_DIRECTORY   '5'

Definition at line 110 of file filesystem.h.

◆ TAR_TYPE_FILE

#define TAR_TYPE_FILE   '0'

Definition at line 105 of file filesystem.h.

◆ TAR_TYPE_HARDLINK

#define TAR_TYPE_HARDLINK   '1'

Definition at line 106 of file filesystem.h.

◆ TAR_TYPE_NAMEDPIPE

#define TAR_TYPE_NAMEDPIPE   '6'

Definition at line 111 of file filesystem.h.

◆ TAR_TYPE_SYMLINK

#define TAR_TYPE_SYMLINK   '2'

Definition at line 107 of file filesystem.h.

Function Documentation

◆ __attribute__()

struct tarHeader __attribute__ ( (packed)  )

Variable Documentation

◆ checksum

char checksum[8]

Definition at line 70 of file filesystem.h.

◆ devmajor

char devmajor[8]

Definition at line 77 of file filesystem.h.

◆ devminor

char devminor[8]

Definition at line 78 of file filesystem.h.

◆ gid

char gid[8]

Definition at line 67 of file filesystem.h.

◆ gname

char gname[32]

Definition at line 76 of file filesystem.h.

◆ linkname

char linkname[100]

Definition at line 72 of file filesystem.h.

◆ magic

char magic[6]

Definition at line 73 of file filesystem.h.

◆ mode

char mode[8]

Definition at line 65 of file filesystem.h.

◆ mtime

char mtime[12]

Definition at line 69 of file filesystem.h.

◆ name

char name[100]

Definition at line 64 of file filesystem.h.

◆ pad

char pad[12]

Definition at line 80 of file filesystem.h.

◆ prefix

char prefix[155]

Definition at line 79 of file filesystem.h.

◆ size

char size[12]

Definition at line 68 of file filesystem.h.

◆ typeflag

char typeflag

Definition at line 71 of file filesystem.h.

◆ uid

char uid[8]

Definition at line 66 of file filesystem.h.

◆ uname

char uname[32]

Definition at line 75 of file filesystem.h.

◆ version

char version[2]

Definition at line 74 of file filesystem.h.