vfs rewrite lol fml

This commit is contained in:
Astronand committed 2026-01-29 20:29:06 -05:00
1 parent 9bd9cdaba4
commit 1c3d2c8b48
25 files changed
+980 -633

No files matched your search

@@ -0,0 +1,3 @@
local fs = require("sys.fs")
assert(fs.mkdir("/tmp/hunit/testdir"), "failed to make directory")
assert(fs.isDir("/tmp/hunit/testdir"), "directory does not exist")
@@ -0,0 +1,10 @@
local fd = syscall.VFS_open("/tmp/hunit/testfile.txt", "w")
syscall.VFS_write(fd, "This is a test file")
syscall.VFS_close(fd)
local fd = syscall.VFS_open("/tmp/hunit/testfile.txt", "r")
local text = syscall.VFS_read(fd, 64)
syscall.VFS_close(fd)
if text~="This is a test file" then
error("File failed to write/read")
end
Whitespace-only changes.