-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.go
57 lines (52 loc) · 1.82 KB
/
test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package main
import (
fayClient "faydfs/client"
"fmt"
)
func main() {
fmt.Println("start")
client := fayClient.GetClient()
fmt.Println("getClient")
result := client.Put("D://testGPU.py", "/testGPU.py")
fmt.Println("Put D://testGPU.py to /testGPU.py ", result.ResultExtraMsg)
//result2 := client.Get("/testGPU.py", "D://testSuccess.py")
//fmt.Println("Get /testGPU.py to D://testSuccess.py ", result2.ResultExtraMsg)
//
//result2 = client.Mkdir("/mydir")
//fmt.Println("Mkdir /mydir ", result2.ResultExtraMsg)
//
//result2 = client.Put("D://testGPU.py", "/mydir/testGPU.py")
//fmt.Println("Put D://testGPU.py to /mydir/testGPU.py ", result2.ResultExtraMsg)
//
//result2 = client.Stat("/mydir")
//fmt.Println("GetStat /mydir", result2.ResultExtraMsg)
//fmt.Println(result2.Data)
//
//result2 = client.List("/mydir")
//fmt.Println("List /mydir ", result2.ResultExtraMsg)
//fmt.Println(result2.Data)
//
//result2 = client.Get("/mydir/testGPU.py", "D://testGPU.py")
//fmt.Println("Get /mydir/testGPU.py to D://testGPU.py ", result2.ResultExtraMsg)
//
//result2 = client.Rename("/mydir/testGPU.py", "/mydir/test.py")
//fmt.Println("Rename /mydir/testGPU.py to /mydir/test.py", result2.ResultExtraMsg)
//
//result2 = client.Get("/mydir/test.py", "D://testRename.py")
//fmt.Println("Get /mydir/test.py to D://testGet.py ", result2.ResultExtraMsg)
//
//result2 = client.List("/mydir")
//fmt.Println("List /mydir ", result2.ResultExtraMsg)
//fmt.Println(result2.Data)
//
//result2 = client.Delete("/mydir/test.py")
//fmt.Println("Delete /mydir/test.py ", result2.ResultExtraMsg)
//
//result2 = client.Stat("/mydir")
//fmt.Println("GetStat /mydir", result2.ResultExtraMsg)
//fmt.Println(result2.Data)
//
//result2 = client.List("/mydir")
//fmt.Println("GetStat /mydir", result2.ResultExtraMsg)
//fmt.Println(result2.Data)
}