struct inode * file_get_inode(struct file *)
Returns the inode encapsulated by FILE.
void file_close(struct file *)
Closes FILE.
struct file * file_open(struct inode *)
Opening and closing files.
off_t file_read(struct file *, void *, off_t)
Reading and writing.
off_t file_length(struct file *)
filesys/file.h
off_t file_read_at(struct file *, void *, off_t size, off_t start)
Reads SIZE bytes from FILE into BUFFER, starting at offset FILE_OFS in the file.
off_t file_write_at(struct file *, const void *, off_t size, off_t start)
Writes SIZE bytes from BUFFER into FILE, starting at offset FILE_OFS in the file.
off_t file_tell(struct file *)
Returns the current position in FILE as a byte offset from the start of the file.
struct file * file_reopen(struct file *)
Opens and returns a new file for the same inode as FILE.
void file_seek(struct file *, off_t)
File position.
off_t file_write(struct file *, const void *, off_t)
Writes SIZE bytes from BUFFER into FILE, starting at the file's current position.
void file_deny_write(struct file *)
Preventing writes.
void file_allow_write(struct file *)
Re-enables write operations on FILE's underlying inode.
int32_t off_t
An offset within a file.