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:
Ayke van Laethem
2020-03-30 20:52:52 +02:00
committed by Ron Evans
parent e907db1481
commit 6bcb40fe01
8 changed files with 336 additions and 95 deletions
+3 -3
View File
@@ -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())