-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp_local.go
More file actions
44 lines (35 loc) · 734 Bytes
/
p_local.go
File metadata and controls
44 lines (35 loc) · 734 Bytes
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
package main
import (
"fmt"
"io/ioutil"
"os"
)
type Local struct {
Path string
}
func (l *Local) Auth() string {
return "Auth Local"
}
func (l *Local) ListBuckets() string {
listdir, _ := ioutil.ReadDir(l.Path)
for i := range listdir {
fmt.Println(listdir[i])
}
return "Local List Buckets"
}
func (l *Local) CreateBucket(bucketName string) string {
os.MkdirAll(l.Path+"/"+bucketName, 0777)
return "Local Create Bucket"
}
func (l *Local) DeleteBucket(bucketName string) string {
return "Local Delete Bucket"
}
func (l *Local) Put(src string, dst string) string {
return "Local Put Object"
}
func (l *Local) Get() string {
return "Local Get Object"
}
func (l *Local) Del() string {
return "Local Put Object"
}