00001 #ifndef FILESYS_FILE_H
00002
00003 #define FILESYS_FILE_H
00004
00005 #include "filesys/off_t.h"
00006
00007 struct inode;
00008
00009
00010 struct file *file_open (struct inode *);
00011 struct file *file_reopen (struct file *);
00012 void file_close (struct file *);
00013 struct inode *file_get_inode (struct file *);
00014
00015
00016 off_t file_read (struct file *, void *, off_t);
00017 off_t file_read_at (struct file *, void *, off_t size, off_t start);
00018 off_t file_write (struct file *, const void *, off_t);
00019 off_t file_write_at (struct file *, const void *, off_t size, off_t start);
00020
00021
00022 void file_deny_write (struct file *);
00023 void file_allow_write (struct file *);
00024
00025
00026 void file_seek (struct file *, off_t);
00027 off_t file_tell (struct file *);
00028 off_t file_length (struct file *);
00029
00030 #endif