feat: filesystem and Files app support for >64 file entries, 64-bit sizes, async ops, GUI toolkit improvements to devexplorer app

This commit is contained in:
2026-06-07 09:33:46 +02:00
parent fc5f5cacf0
commit 427876afa7
27 changed files with 1110 additions and 293 deletions
+16 -3
View File
@@ -374,17 +374,30 @@ namespace Fs::Vfs {
}
int VfsReadDir(const char* path, const char** outNames, int maxEntries) {
return VfsReadDirAt(path, outNames, maxEntries, 0);
}
int VfsReadDirAt(const char* path, const char** outNames, int maxEntries, int startIndex) {
int drive;
const char* localPath;
if (startIndex < 0) return -1;
if (!ParsePath(path, drive, localPath)) return -1;
if (drive < 0 || drive >= MaxDrives || !driveActive[drive] || driveTable[drive] == nullptr) return -1;
vfsLock.Acquire();
FsDriver* driver = driveTable[drive];
int result = (driveActive[drive] && driver && driver->ReadDir)
? driver->ReadDir(localPath, outNames, maxEntries)
: -1;
int result;
if (!driveActive[drive] || !driver) {
result = -1;
} else if (driver->ReadDirAt) {
result = driver->ReadDirAt(localPath, outNames, maxEntries, startIndex);
} else if (driver->ReadDir) {
// Driver without pagination support: only the first page is reachable.
result = (startIndex == 0) ? driver->ReadDir(localPath, outNames, maxEntries) : 0;
} else {
result = -1;
}
vfsLock.Release();
return result;
}