diff options
Diffstat (limited to 'doc/vfs.txt')
-rw-r--r-- | doc/vfs.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/vfs.txt b/doc/vfs.txt index 255ddb0..5a6a0b2 100644 --- a/doc/vfs.txt +++ b/doc/vfs.txt @@ -8,11 +8,13 @@ File are objects that implement an abstract file class in the kernel. Its method - int stat(struct file_info *info) - file* get_child(char* name) - int add_child(char* name, file *child) +- int get_size() The following syscall interface is given to the process (fd_t is a file descriptor, an int) : - fd_t open(char* filename, int mode) - fd_t open_relative(fd_t root, char* filename, int mode) - int stat(char* filename, struct file_info *info) +- int stat_relative(fd_t root, char* filename, struct file_info *info) - int statf(fd_t file, struct file_info *info) - void close(fd_t file) - int read(fd_t file, size_t offset, size_t len, char *buffer) @@ -33,6 +35,7 @@ File open modes flags : - FM_APPEND append data - FM_TRUNC truncate existing file - FM_CREATE create file if it doesn't exist +- FM_DELETE delete the file - incompatible with everything else note : if mode contains neither FM_READ nor FM_WRITE, then the file will be created/truncated according to the flags given, but will not be actually oppenned, so the return value of open will be 0. |