feat: vfs - add stat syscall
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user