18#ifndef __LIB_LIBFS_FILE_H
19#define __LIB_LIBFS_FILE_H
Represents a file present on a FileSystem.
FileSystem::FileModes m_access
Access permissions.
FileSystem::FileType getType() const
Retrieve our filetype.
UserID m_uid
Owner of the file.
u32 getInode() const
Get inode number.
const u32 m_inode
Inode number.
Size m_size
Size of the file, in bytes.
virtual bool canRead() const
Check if the File has data ready for reading.
virtual FileSystem::Result write(IOBuffer &buffer, Size &size, const Size offset)
Write bytes to the file.
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read bytes from the file.
virtual FileSystem::Result status(FileSystem::FileStat &st)
Retrieve file statistics.
const FileSystem::FileType m_type
Type of this file.
GroupID m_gid
Group of the file.
virtual ~File()
Destructor function.
virtual bool canWrite() const
Check if the File can be written to.
Abstract Input/Output buffer.
unsigned int u32
Unsigned 32-bit number.
unsigned short UserID
User Identity.
unsigned short GroupID
Group Identity.
unsigned int Size
Any sane size indicator cannot go negative.
FileType
All possible filetypes.
Result
Result code for filesystem Actions.
u16 FileModes
Multiple FileMode values combined.
Contains file information.