mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 03:27:48 +00:00
os: implement virtual filesystem support
This allows applications to mount filesystems in the os package. This is useful for mounting external flash filesystems, for example.
This commit is contained in:
committed by
Ron Evans
parent
e907db1481
commit
6bcb40fe01
Vendored
+3
-3
@@ -9,9 +9,9 @@ import (
|
||||
|
||||
func main() {
|
||||
// package os, fmt
|
||||
fmt.Println("stdin: ", os.Stdin.Fd())
|
||||
fmt.Println("stdout:", os.Stdout.Fd())
|
||||
fmt.Println("stderr:", os.Stderr.Fd())
|
||||
fmt.Println("stdin: ", os.Stdin.Name())
|
||||
fmt.Println("stdout:", os.Stdout.Name())
|
||||
fmt.Println("stderr:", os.Stderr.Name())
|
||||
|
||||
// package math/rand
|
||||
fmt.Println("pseudorandom number:", rand.Int31())
|
||||
|
||||
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
stdin: 0
|
||||
stdout: 1
|
||||
stderr: 2
|
||||
stdin: /dev/stdin
|
||||
stdout: /dev/stdout
|
||||
stderr: /dev/stderr
|
||||
pseudorandom number: 1298498081
|
||||
strings.IndexByte: 2
|
||||
strings.Replace: An-example-string
|
||||
|
||||
Reference in New Issue
Block a user