21 #include "FatFilesystem.h" 24 String name, Time::Timestamp accessedTime, Time::Timestamp modifiedTime,
25 Time::Timestamp creationTime, uintptr_t inode,
class Filesystem *pFs,
26 size_t size, uint32_t dirClus, uint32_t dirOffset,
File *pParent)
28 name, accessedTime, modifiedTime, creationTime, inode, pFs, size,
30 m_DirClus(dirClus), m_DirOffset(dirOffset), m_FileBlockCache()
36 FILE_UR | FILE_UW | FILE_UX | FILE_GR | FILE_GW | FILE_GX | FILE_OR |
48 uintptr_t buffer = m_FileBlockCache.
insert(location);
61 uint64_t end = location + sz;
63 sz = getSize() - location;
64 pFs->write(
this, location, sz, addr);
69 m_FileBlockCache.
sync(offset, async);
74 m_FileBlockCache.
pin(location);
79 m_FileBlockCache.
release(location);
88 pFs->extend(
this, newSize);
static void writeCallback(CacheConstants::CallbackCause cause, uintptr_t loc, uintptr_t page, void *meta)
uintptr_t insert(uintptr_t key, bool *alreadyExisted=nullptr)
virtual void extend(size_t newSize)
void markNoLongerEditing(uintptr_t key, size_t length=0)
void sync(uintptr_t key, bool async)
virtual size_t getBlockSize() const
virtual void pinBlock(uint64_t location)
FatFile(const File &file)
void release(uintptr_t key)
uintptr_t readBlock(uint64_t location)
virtual void unpinBlock(uint64_t location)
void setCallback(writeback_t newCallback, void *meta)
void writeBlock(uint64_t location, uintptr_t addr)