Implemented stat syscall
This commit is contained in:
parent
98abc0d3a8
commit
c238e3a190
6 changed files with 69 additions and 0 deletions
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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue