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