c28201d9b8b82022faf1e80671b5d366b01ec219
[pintos-anon] / src / filesys / file.h
1 #ifndef FILESYS_FILE_H
2 #define FILESYS_FILE_H
3
4 #include <stddef.h>
5 #include "devices/disk.h"
6 #include "filesys/off_t.h"
7
8 struct file *file_open (disk_sector_t);
9 void file_close (struct file *);
10 off_t file_read (struct file *, void *, off_t);
11 off_t file_read_at (struct file *, void *, off_t size, off_t start);
12 off_t file_write (struct file *, const void *, off_t);
13 off_t file_write_at (struct file *, const void *, off_t size, off_t start);
14 off_t file_length (struct file *);
15 void file_seek (struct file *, off_t);
16 off_t file_tell (struct file *);
17 void file_remove (struct file *);
18
19 #endif /* filesys/file.h */