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:
@@ -36,15 +36,24 @@ namespace Montauk {
|
||||
Ipc::CloseHandle(handle);
|
||||
}
|
||||
|
||||
static int Sys_ReadDirAt(const char* path, const char** outNames, int maxEntries,
|
||||
int startIndex);
|
||||
|
||||
static int Sys_ReadDir(const char* path, const char** outNames, int maxEntries) {
|
||||
return Sys_ReadDirAt(path, outNames, maxEntries, 0);
|
||||
}
|
||||
|
||||
static int Sys_ReadDirAt(const char* path, const char** outNames, int maxEntries,
|
||||
int startIndex) {
|
||||
char resolved[256];
|
||||
if (!ResolveProcessPath(path, resolved, sizeof(resolved))) return -1;
|
||||
if (startIndex < 0) return -1;
|
||||
|
||||
// Get entries from VFS into a kernel-local array
|
||||
const char* kernelNames[256];
|
||||
int max = maxEntries;
|
||||
if (max > 256) max = 256;
|
||||
int count = Fs::Vfs::VfsReadDir(resolved, kernelNames, max);
|
||||
int count = Fs::Vfs::VfsReadDirAt(resolved, kernelNames, max, startIndex);
|
||||
if (count <= 0) return count;
|
||||
|
||||
// Allocate a user-accessible page for string data via process heap
|
||||
|
||||
Reference in New Issue
Block a user