@@ -29,29 +29,24 @@ type Filesystem interface {
29
29
type Basic interface {
30
30
// Create creates the named file with mode 0666 (before umask), truncating
31
31
// it if it already exists. If successful, methods on the returned File can
32
- // be used for I/O; the associated file descriptor has mode O_RDWR. If there
33
- // is an error, it will be of type *PathError.
32
+ // be used for I/O; the associated file descriptor has mode O_RDWR.
34
33
Create (filename string ) (File , error )
35
34
// Open opens the named file for reading. If successful, methods on the
36
35
// returned file can be used for reading; the associated file descriptor has
37
- // mode O_RDONLY. If there is an error, it will be of type *PathError.
36
+ // mode O_RDONLY.
38
37
Open (filename string ) (File , error )
39
38
// OpenFile is the generalized open call; most users will use Open or Create
40
39
// instead. It opens the named file with specified flag (O_RDONLY etc.) and
41
40
// perm, (0666 etc.) if applicable. If successful, methods on the returned
42
- // File can be used for I/O. If there is an error, it will be of type
43
- // *PathError.
41
+ // File can be used for I/O.
44
42
OpenFile (filename string , flag int , perm os.FileMode ) (File , error )
45
- // Stat returns a FileInfo describing the named file. If there is an error,
46
- // it will be of type *PathError.
43
+ // Stat returns a FileInfo describing the named file.
47
44
Stat (filename string ) (os.FileInfo , error )
48
45
// Rename renames (moves) oldpath to newpath. If newpath already exists and
49
46
// is not a directory, Rename replaces it. OS-specific restrictions may
50
- // apply when oldpath and newpath are in different directories. If there is
51
- // an error, it will be of type *LinkError.
47
+ // apply when oldpath and newpath are in different directories.
52
48
Rename (oldpath , newpath string ) error
53
- // Remove removes the named file or directory. If there is an error, it will
54
- // be of type *PathError.
49
+ // Remove removes the named file or directory.
55
50
Remove (filename string ) error
56
51
// Join joins any number of path elements into a single path, adding a
57
52
// Separator if necessary. Join calls filepath.Clean on the result; in
@@ -90,39 +85,33 @@ type Dir interface {
90
85
type Symlink interface {
91
86
// Lstat returns a FileInfo describing the named file. If the file is a
92
87
// symbolic link, the returned FileInfo describes the symbolic link. Lstat
93
- // makes no attempt to follow the link. If there is an error, it will be of
94
- // type *PathError.
88
+ // makes no attempt to follow the link.
95
89
Lstat (filename string ) (os.FileInfo , error )
96
90
// Symlink creates a symbolic-link from link to target. target may be an
97
91
// absolute or relative path, and need not refer to an existing node.
98
- // Parent directories of link are created as necessary. If there is an
99
- // error, it will be of type *LinkError.
92
+ // Parent directories of link are created as necessary.
100
93
Symlink (target , link string ) error
101
- // Readlink returns the target path of link. If there is an error, it will
102
- // be of type *PathError.
94
+ // Readlink returns the target path of link.
103
95
Readlink (link string ) (string , error )
104
96
}
105
97
106
98
// Change abstract the FileInfo change related operations in a storage-agnostic
107
99
// interface as an extension to the Basic interface
108
100
type Change interface {
109
101
// Chmod changes the mode of the named file to mode. If the file is a
110
- // symbolic link, it changes the mode of the link's target. If there is an
111
- // error, it will be of type *PathError.
102
+ // symbolic link, it changes the mode of the link's target.
112
103
Chmod (name string , mode os.FileMode ) error
113
104
// Lchown changes the numeric uid and gid of the named file. If the file is
114
- // a symbolic link, it changes the uid and gid of the link itself. If there
115
- // is an error, it will be of type *PathError.
105
+ // a symbolic link, it changes the uid and gid of the link itself.
116
106
Lchown (name string , uid , gid int ) error
117
107
// Chown changes the numeric uid and gid of the named file. If the file is a
118
- // symbolic link, it changes the uid and gid of the link's target. If there
119
- // is an error, it will be of type *PathError.
108
+ // symbolic link, it changes the uid and gid of the link's target.
120
109
Chown (name string , uid , gid int ) error
121
110
// Chtimes changes the access and modification times of the named file,
122
111
// similar to the Unix utime() or utimes() functions.
123
112
//
124
113
// The underlying filesystem may truncate or round the values to a less
125
- // precise time unit. If there is an error, it will be of type *PathError.
114
+ // precise time unit.
126
115
Chtimes (name string , atime time.Time , mtime time.Time ) error
127
116
}
128
117
0 commit comments