OpenFile tested

This commit is contained in:
mkvolkov 2022-08-21 11:00:03 +03:00
parent 544ea15b3b
commit d3bd8d73a0
1 changed files with 4 additions and 2 deletions

View File

@ -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()
} }