From d3bd8d73a0f071b7b84e7e1466a0674592d8dcef Mon Sep 17 00:00:00 2001 From: mkvolkov Date: Sun, 21 Aug 2022 11:00:03 +0300 Subject: [PATCH] OpenFile tested --- rclonetest/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rclonetest/main.go b/rclonetest/main.go index 09890b3..15a3db3 100644 --- a/rclonetest/main.go +++ b/rclonetest/main.go @@ -8,12 +8,14 @@ import ( ) 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 { fmt.Printf("Error: %v\n", err) os.Exit(1) } + file.WriteString("{\"game\":\"Max Payne\"}") + file.Close() }