diff options
| author | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
| commit | 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b (patch) | |
| tree | 868c52e06f207b5ec8a3cc141f4b8b2bdfcc165c /filesys/file.h | |
| parent | eae0bd57f0a26314a94785061888d193d186944a (diff) | |
| download | progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.gz progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.bz2 progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.zip | |
reorganize file structure to match the upstream requirements
Diffstat (limited to 'filesys/file.h')
| -rw-r--r-- | filesys/file.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/filesys/file.h b/filesys/file.h new file mode 100644 index 0000000..a33c5af --- /dev/null +++ b/filesys/file.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #ifndef FILESYS_FILE_H | ||
| 2 | #define FILESYS_FILE_H | ||
| 3 | |||
| 4 | #include "filesys/off_t.h" | ||
| 5 | |||
| 6 | struct inode; | ||
| 7 | |||
| 8 | /* Opening and closing files. */ | ||
| 9 | struct file *file_open (struct inode *); | ||
| 10 | struct file *file_reopen (struct file *); | ||
| 11 | void file_close (struct file *); | ||
| 12 | struct inode *file_get_inode (struct file *); | ||
| 13 | |||
| 14 | /* Reading and writing. */ | ||
| 15 | off_t file_read (struct file *, void *, off_t); | ||
| 16 | off_t file_read_at (struct file *, void *, off_t size, off_t start); | ||
| 17 | off_t file_write (struct file *, const void *, off_t); | ||
| 18 | off_t file_write_at (struct file *, const void *, off_t size, off_t start); | ||
| 19 | |||
| 20 | /* Preventing writes. */ | ||
| 21 | void file_deny_write (struct file *); | ||
| 22 | void file_allow_write (struct file *); | ||
| 23 | |||
| 24 | /* File position. */ | ||
| 25 | void file_seek (struct file *, off_t); | ||
| 26 | off_t file_tell (struct file *); | ||
| 27 | off_t file_length (struct file *); | ||
| 28 | |||
| 29 | #endif /* filesys/file.h */ | ||
