feat: vfs - add stat syscall

This commit is contained in:
2026-07-21 14:23:06 +02:00
parent 5c02c5fe79
commit de7edaf623
12 changed files with 110 additions and 1 deletions
+5
View File
@@ -165,6 +165,11 @@ namespace montauk {
inline int frename(const char* oldPath, const char* newPath) {
return (int)syscall2(montauk::abi::SYS_FRENAME, (uint64_t)oldPath, (uint64_t)newPath);
}
// Fill *out with metadata (size, timestamps, mode) for the path.
// Returns 0 on success, -1 on error or if the filesystem lacks stat support.
inline int stat(const char* path, montauk::abi::FileStat* out) {
return (int)syscall2(montauk::abi::SYS_STAT, (uint64_t)path, (uint64_t)out);
}
inline int drivelist(int* outDrives, int max) {
return (int)syscall2(montauk::abi::SYS_DRIVELIST, (uint64_t)outDrives, (uint64_t)max);
}