-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos.go
83 lines (63 loc) · 1.51 KB
/
os.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package fil
import (
"os"
"time"
"os/exec"
)
func Getwd() (dir string, err error) {
return os.Getwd()
}
func Chdir(dir string) error {
return os.Chdir(dir)
}
func Chmod(name string, mode os.FileMode) error {
return os.Chmod(name, mode)
}
func Readlink(name string) (string, error) {
return os.Readlink(name)
}
func Chown(name string, uid, gid int) error {
return os.Chown(name, uid, gid)
}
func Lchown(name string, uid, gid int) error {
return os.Lchown(name, uid, gid)
}
func Chtimes(name string, atime time.Time, mtime time.Time) error {
return os.Chtimes(name, atime, mtime)
}
func Mkdir(name string, perm os.FileMode) error {
return os.Mkdir(name, perm)
}
func MkdirAll(path string, perm os.FileMode) error {
return os.MkdirAll(path, perm)
}
func Remove(path string) error {
return os.Remove(path)
}
func RemoveAll(path string) error {
return os.RemoveAll(path)
}
func Rename(oldname, newname string) error {
return os.Rename(oldname, newname)
}
func Symlink(oldname, newname string) error {
return os.Symlink(oldname, newname)
}
func Link(oldname, newname string) error {
return os.Link(oldname, newname)
}
func SameFile(fi1, fi2 os.FileInfo) bool {
return os.SameFile(fi1, fi2)
}
func Truncate(name string, size int64) error {
return os.Truncate(name, size)
}
func LookPath(file string) (string, error) {
return exec.LookPath(file)
}
func Stat(name string) (os.FileInfo, error) {
return os.Stat(name)
}
func Lstat(name string) (os.FileInfo, error) {
return os.Lstat(name)
}