The Filesystem interface abstracts access to the file system.
| 29 | |
| 30 | // The Filesystem interface abstracts access to the file system. |
| 31 | type Filesystem interface { |
| 32 | Chmod(name string, mode FileMode) error |
| 33 | Lchown(name string, uid, gid string) error // uid/gid as strings; numeric on POSIX, SID on Windows, like in os/user package |
| 34 | Chtimes(name string, atime time.Time, mtime time.Time) error |
| 35 | Create(name string) (File, error) |
| 36 | CreateSymlink(target, name string) error |
| 37 | DirNames(name string) ([]string, error) |
| 38 | Lstat(name string) (FileInfo, error) |
| 39 | Mkdir(name string, perm FileMode) error |
| 40 | MkdirAll(name string, perm FileMode) error |
| 41 | Open(name string) (File, error) |
| 42 | OpenFile(name string, flags int, mode FileMode) (File, error) |
| 43 | ReadSymlink(name string) (string, error) |
| 44 | Remove(name string) error |
| 45 | RemoveAll(name string) error |
| 46 | Rename(oldname, newname string) error |
| 47 | Stat(name string) (FileInfo, error) |
| 48 | Walk(name string, walkFn WalkFunc) error |
| 49 | // If setup fails, returns non-nil error, and if afterwards a fatal (!) |
| 50 | // error occurs, sends that error on the channel. Afterwards this watch |
| 51 | // can be considered stopped. |
| 52 | Watch(path string, ignore Matcher, ctx context.Context, ignorePerms bool) (<-chan Event, <-chan error, error) |
| 53 | Hide(name string) error |
| 54 | Unhide(name string) error |
| 55 | Glob(pattern string) ([]string, error) |
| 56 | Roots() ([]string, error) |
| 57 | Usage(name string) (Usage, error) |
| 58 | Type() FilesystemType |
| 59 | URI() string |
| 60 | Options() []Option |
| 61 | SameFile(fi1, fi2 FileInfo) bool |
| 62 | PlatformData(name string, withOwnership, withXattrs bool, xattrFilter XattrFilter) (protocol.PlatformData, error) |
| 63 | GetXattr(name string, xattrFilter XattrFilter) ([]protocol.Xattr, error) |
| 64 | SetXattr(path string, xattrs []protocol.Xattr, xattrFilter XattrFilter) error |
| 65 | } |
| 66 | |
| 67 | type wrappingFilesystem interface { |
| 68 | // Used for unwrapping things |
no outgoing calls
no test coverage detected