56 SyncStatus
sync()
override;
59 uint64_t read(
File* pFile, uint64_t location, uint64_t size, uintptr_t buffer,
60 bool bCanBlock =
true);
61 uint64_t write(
File* pFile, uint64_t location, uint64_t size, uintptr_t buffer,
62 bool bCanBlock =
true);
63 void truncate(
File* pFile);
64 void fileAttributeChanged(
File* pFile);
65 void cacheDirectoryContents(
File* pFile);
66 void extend(
File* pFile,
size_t size);
74 const String& newName,
File* replaced)
override;
81 void cacheVolumeLabel();
84 bool readCluster(uint32_t block, uintptr_t buffer)
const;
93 bool readSectorBlock(uint32_t sec,
size_t size, uintptr_t buffer)
const;
104 bool setClusterEntry(uint32_t cluster, uint32_t value,
bool bLock =
true,
bool persist =
true);
115 bool syncFat(
bool bLock =
true);
116 bool invalidateFsInfoHints();
117 bool m_FsInfoInvalidated =
false;
118 uint8_t* getFatSector(uint32_t sector);
119 bool chainExtent(
File* file, uint32_t& count, uint32_t& last);
120 uint32_t fileClusterAt(
File*,
size_t);
121 uint64_t m_ChainRevision = 1;
122 bool truncateFile(
File* file);
125 bool trimFileAllocation(
FatFile*);
126 void publishSize(
File*,
size_t);
127 void unlinkNode(
File*);
128 void retireNode(
File*);
129 void moveNode(
File*, uint32_t, uint32_t);
130 bool isNodeUnlinked(
File*)
const;
131 void writeEntryAttributes(
File*,
Dir*,
bool creating =
false);
133 bool syncNodeAttributes(
File*);
134 bool syncNode(
File*);
143 bool syncPendingAttributes();
144 void movePendingAttributes(uint32_t oldCluster, uint32_t oldOffset, uint32_t newCluster,
146 void discardPendingAttributes(uint32_t cluster, uint32_t offset);
147 void clearPendingAttributes();
149 Time::Timestamp, Time::Timestamp);
150 void releaseFileState(
FatFile*);
151 uintptr_t fileIdentifier(uint32_t cluster, uint32_t offset);
152 uintptr_t fileIdentifierLocked(uint64_t slot);
154 bool drainFileStates(
bool checked =
false);
157 uint32_t directoryCluster = 0, directoryOffset = 0;
158 bool unlinked =
false;
163 void registerNode(
File*);
164 void releaseNode(
File*);
165 void moveNonFileNode(
File*, uint32_t, uint32_t);
166 void unlinkNonFileNode(
File*);
170 uintptr_t m_NextFileIdentifier = 0x10000000;
172 bool m_IoFailed =
false;
173 bool m_ShutdownComplete =
false;
174 bool ensureCapacity(
File* file,
size_t size);
175 bool zeroRange(
File* file,
size_t begin,
size_t end);
176 bool updateFileMetadata(
File* file,
size_t size);
177 bool syncFileMetadata(
File* file);
178 uint64_t allocatedBlocks(
File* file);
195 uint32_t dirClus = 0,
bool publish =
true);
207 bool isEof(uint32_t cluster)
const {
222 Time::Timestamp getUnixTimestamp(uint16_t time, uint16_t date)
const;
223 uint16_t getFatDate(Time::Timestamp timestamp)
const;
224 uint16_t getFatTime(Time::Timestamp timestamp)
const;
237 uint32_t m_RootDirCount;
261#if THREADS || defined(STANDALONE_MUTEXES)