Implemented stat syscall
This commit is contained in:
13
examples/readfile/readfile.q
Normal file
13
examples/readfile/readfile.q
Normal file
@ -0,0 +1,13 @@
|
||||
import fs
|
||||
import sys
|
||||
|
||||
main() {
|
||||
show("/proc/sys/kernel/ostype")
|
||||
show("/proc/sys/kernel/osrelease")
|
||||
show("/proc/sys/kernel/arch")
|
||||
}
|
||||
|
||||
show(path []byte) {
|
||||
contents, length := fs.readFile(path)
|
||||
sys.write(1, contents, length)
|
||||
}
|
Reference in New Issue
Block a user