-
Notifications
You must be signed in to change notification settings - Fork 20
/
stub.go
61 lines (53 loc) · 1.11 KB
/
stub.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
58
59
60
61
package vos
import (
"os"
"time"
)
type FileInfo os.FileInfo
func Stat(name string) (FileInfo, error) {
l("stat", name)
fi, err := os.Stat(name)
return FileInfo(fi), err
}
func Lstat(name string) (FileInfo, error) {
l("lstat", name)
fi, err := os.Lstat(name)
return FileInfo(fi), err
}
func IsNotExist(err error) bool {
return os.IsNotExist(err)
}
func Getwd() (string, error) {
return os.Getwd()
}
func Getenv(key string) string {
return os.Getenv(key)
}
func Open(name string) (*os.File, error) {
l("open", name)
return os.Open(name)
}
func MkdirAll(path string, perm os.FileMode) error {
l("mkdirall", path)
return os.MkdirAll(path, perm)
}
func Remove(name string) error {
l("remove", name)
return os.Remove(name)
}
func RemoveAll(name string) error {
l("removeall", name)
return os.RemoveAll(name)
}
func Create(name string) (*os.File, error) {
l("create", name)
return os.Create(name)
}
func Chmod(name string, mode os.FileMode) error {
l("chmod", name)
return os.Chmod(name, mode)
}
func Chtimes(name string, atime, mtime time.Time) error {
l("chtimes", name)
return os.Chtimes(name, atime, mtime)
}