44 "errors"
55 "io"
66 "io/fs"
7- "os"
87 "time"
98)
109
@@ -73,9 +72,9 @@ type Basic interface {
7372 // instead. It opens the named file with specified flag (O_RDONLY etc.) and
7473 // perm, (0666 etc.) if applicable. If successful, methods on the returned
7574 // File can be used for I/O.
76- OpenFile (filename string , flag int , perm os .FileMode ) (File , error )
75+ OpenFile (filename string , flag int , perm fs .FileMode ) (File , error )
7776 // Stat returns a FileInfo describing the named file.
78- Stat (filename string ) (os .FileInfo , error )
77+ Stat (filename string ) (fs .FileInfo , error )
7978 // Rename renames (moves) oldpath to newpath. If newpath already exists and
8079 // is not a directory, Rename replaces it. OS-specific restrictions may
8180 // apply when oldpath and newpath are in different directories.
@@ -106,12 +105,12 @@ type TempFile interface {
106105type Dir interface {
107106 // ReadDir reads the directory named by dirname and returns a list of
108107 // directory entries sorted by filename.
109- ReadDir (path string ) ([]os .FileInfo , error )
108+ ReadDir (path string ) ([]fs .FileInfo , error )
110109 // MkdirAll creates a directory named path, along with any necessary
111110 // parents, and returns nil, or else returns an error. The permission bits
112111 // perm are used for all directories that MkdirAll creates. If path is/
113112 // already a directory, MkdirAll does nothing and returns nil.
114- MkdirAll (filename string , perm os .FileMode ) error
113+ MkdirAll (filename string , perm fs .FileMode ) error
115114}
116115
117116// Symlink abstract the symlink related operations in a storage-agnostic
@@ -120,7 +119,7 @@ type Symlink interface {
120119 // Lstat returns a FileInfo describing the named file. If the file is a
121120 // symbolic link, the returned FileInfo describes the symbolic link. Lstat
122121 // makes no attempt to follow the link.
123- Lstat (filename string ) (os .FileInfo , error )
122+ Lstat (filename string ) (fs .FileInfo , error )
124123 // Symlink creates a symbolic-link from link to target. target may be an
125124 // absolute or relative path, and need not refer to an existing node.
126125 // Parent directories of link are created as necessary.
@@ -134,7 +133,7 @@ type Symlink interface {
134133type Change interface {
135134 // Chmod changes the mode of the named file to mode. If the file is a
136135 // symbolic link, it changes the mode of the link's target.
137- Chmod (name string , mode os .FileMode ) error
136+ Chmod (name string , mode fs .FileMode ) error
138137 // Lchown changes the numeric uid and gid of the named file. If the file is
139138 // a symbolic link, it changes the uid and gid of the link itself.
140139 Lchown (name string , uid , gid int ) error
0 commit comments