mirror of https://github.com/spf13/afero.git
OpenFile tested
This commit is contained in:
parent
544ea15b3b
commit
d3bd8d73a0
|
@ -8,12 +8,14 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
RFS, _ := rclonefs.CreateRCFS("pcloud_mv1:")
|
RFS, _ := rclonefs.CreateRCFS("pcloud_mv1:/cfg/json")
|
||||||
|
|
||||||
err := RFS.MkdirAll("/data/passwords/sites/github/", 0750)
|
file, err := RFS.OpenFile("../../obj1.json", os.O_RDWR | os.O_TRUNC, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error: %v\n", err)
|
fmt.Printf("Error: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file.WriteString("{\"game\":\"Max Payne\"}")
|
||||||
|
file.Close()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue