summaryrefslogtreecommitdiffstats
path: root/pintos-progos/filesys/file.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2012-03-26 12:54:45 +0200
committermanuel <manuel@mausz.at>2012-03-26 12:54:45 +0200
commitb5f0874cd96ee2a62aabc645b9626c2749cb6a01 (patch)
tree1262e4bbe0634de6650be130c36e0538240f4cbf /pintos-progos/filesys/file.h
downloadprogos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.gz
progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.tar.bz2
progos-b5f0874cd96ee2a62aabc645b9626c2749cb6a01.zip
initial pintos checkin
Diffstat (limited to 'pintos-progos/filesys/file.h')
-rw-r--r--pintos-progos/filesys/file.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/pintos-progos/filesys/file.h b/pintos-progos/filesys/file.h
new file mode 100644
index 0000000..a33c5af
--- /dev/null
+++ b/pintos-progos/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
6struct inode;
7
8/* Opening and closing files. */
9struct file *file_open (struct inode *);
10struct file *file_reopen (struct file *);
11void file_close (struct file *);
12struct inode *file_get_inode (struct file *);
13
14/* Reading and writing. */
15off_t file_read (struct file *, void *, off_t);
16off_t file_read_at (struct file *, void *, off_t size, off_t start);
17off_t file_write (struct file *, const void *, off_t);
18off_t file_write_at (struct file *, const void *, off_t size, off_t start);
19
20/* Preventing writes. */
21void file_deny_write (struct file *);
22void file_allow_write (struct file *);
23
24/* File position. */
25void file_seek (struct file *, off_t);
26off_t file_tell (struct file *);
27off_t file_length (struct file *);
28
29#endif /* filesys/file.h */