Versions in this module Expand all Collapse all v1 v1.48.0 Jun 15, 2019 v1.47.0 Apr 13, 2019 v1.46.0 Feb 9, 2019 Changes in this version type Options + CacheMaxSize fs.SizeSuffix v1.43.1 Sep 7, 2018 Changes in this version + var DefaultOpt = Options + var ECLOSED = os.ErrClosed + var EEXIST = os.ErrExist + var EINVAL = os.ErrInvalid + var ENOENT = os.ErrNotExist + var EPERM = os.ErrPermission + var Help = ... + type CacheMode byte + const CacheModeFull + const CacheModeMinimal + const CacheModeOff + const CacheModeWrites + func (l *CacheMode) Set(s string) error + func (l *CacheMode) Type() string + func (l CacheMode) String() string + type Dir struct + func (d *Dir) Create(name string, flags int) (*File, error) + func (d *Dir) DirEntry() (entry fs.DirEntry) + func (d *Dir) ForgetAll() + func (d *Dir) ForgetPath(relativePath string, entryType fs.EntryType) + func (d *Dir) Inode() uint64 + func (d *Dir) IsDir() bool + func (d *Dir) IsFile() bool + func (d *Dir) Mkdir(name string) (*Dir, error) + func (d *Dir) ModTime() time.Time + func (d *Dir) Mode() (mode os.FileMode) + func (d *Dir) Name() (name string) + func (d *Dir) Node() Node + func (d *Dir) Open(flags int) (fd Handle, err error) + func (d *Dir) Path() (name string) + func (d *Dir) ReadDirAll() (items Nodes, err error) + func (d *Dir) Remove() error + func (d *Dir) RemoveAll() error + func (d *Dir) RemoveName(name string) error + func (d *Dir) Rename(oldName, newName string, destDir *Dir) error + func (d *Dir) SetModTime(modTime time.Time) error + func (d *Dir) Size() int64 + func (d *Dir) Stat(name string) (node Node, err error) + func (d *Dir) String() string + func (d *Dir) Sync() error + func (d *Dir) Sys() interface{} + func (d *Dir) Truncate(size int64) error + func (d *Dir) VFS() *VFS + type DirHandle struct + func (fh *DirHandle) Close() (err error) + func (fh *DirHandle) Node() Node + func (fh *DirHandle) Readdir(n int) (fis []os.FileInfo, err error) + func (fh *DirHandle) Readdirnames(n int) (names []string, err error) + func (fh *DirHandle) Stat() (fi os.FileInfo, err error) + func (fh *DirHandle) String() string + func (h DirHandle) Chdir() error + func (h DirHandle) Chmod(mode os.FileMode) error + func (h DirHandle) Chown(uid, gid int) error + func (h DirHandle) Fd() uintptr + func (h DirHandle) Flush() (err error) + func (h DirHandle) Name() string + func (h DirHandle) Read(b []byte) (n int, err error) + func (h DirHandle) ReadAt(b []byte, off int64) (n int, err error) + func (h DirHandle) Release() (err error) + func (h DirHandle) Seek(offset int64, whence int) (ret int64, err error) + func (h DirHandle) Sync() error + func (h DirHandle) Truncate(size int64) error + func (h DirHandle) Write(b []byte) (n int, err error) + func (h DirHandle) WriteAt(b []byte, off int64) (n int, err error) + func (h DirHandle) WriteString(s string) (n int, err error) + type Error byte + const EBADF + const ENOSYS + const ENOTEMPTY + const EROFS + const ESPIPE + const OK + func (e Error) Error() string + type File struct + func (f *File) Dir() *Dir + func (f *File) DirEntry() (entry fs.DirEntry) + func (f *File) Inode() uint64 + func (f *File) IsDir() bool + func (f *File) IsFile() bool + func (f *File) ModTime() (modTime time.Time) + func (f *File) Mode() (mode os.FileMode) + func (f *File) Name() (name string) + func (f *File) Node() Node + func (f *File) Open(flags int) (fd Handle, err error) + func (f *File) Path() string + func (f *File) Remove() error + func (f *File) RemoveAll() error + func (f *File) SetModTime(modTime time.Time) error + func (f *File) Size() int64 + func (f *File) String() string + func (f *File) Sync() error + func (f *File) Sys() interface{} + func (f *File) Truncate(size int64) (err error) + func (f *File) VFS() *VFS + type Handle interface + Flush func() error + Node func() Node + Release func() error + type Node interface + DirEntry func() fs.DirEntry + Inode func() uint64 + IsFile func() bool + Open func(flags int) (Handle, error) + Path func() string + Remove func() error + RemoveAll func() error + SetModTime func(modTime time.Time) error + Sync func() error + Truncate func(size int64) error + VFS func() *VFS + type Noder interface + Node func() Node + type Nodes []Node + func (ns Nodes) Len() int + func (ns Nodes) Less(i, j int) bool + func (ns Nodes) Swap(i, j int) + type Options struct + CacheMaxAge time.Duration + CacheMode CacheMode + CachePollInterval time.Duration + ChunkSize fs.SizeSuffix + ChunkSizeLimit fs.SizeSuffix + DirCacheTime time.Duration + DirPerms os.FileMode + FilePerms os.FileMode + GID uint32 + NoChecksum bool + NoModTime bool + NoSeek bool + PollInterval time.Duration + ReadOnly bool + UID uint32 + Umask int + type OsFiler interface + Chdir func() error + Chmod func(mode os.FileMode) error + Chown func(uid, gid int) error + Close func() error + Fd func() uintptr + Name func() string + Read func(b []byte) (n int, err error) + ReadAt func(b []byte, off int64) (n int, err error) + Readdir func(n int) ([]os.FileInfo, error) + Readdirnames func(n int) (names []string, err error) + Seek func(offset int64, whence int) (ret int64, err error) + Stat func() (os.FileInfo, error) + Sync func() error + Truncate func(size int64) error + Write func(b []byte) (n int, err error) + WriteAt func(b []byte, off int64) (n int, err error) + WriteString func(s string) (n int, err error) + type RWFileHandle struct + func (fh *RWFileHandle) Close() error + func (fh *RWFileHandle) Flush() error + func (fh *RWFileHandle) Node() Node + func (fh *RWFileHandle) Read(b []byte) (n int, err error) + func (fh *RWFileHandle) ReadAt(b []byte, off int64) (n int, err error) + func (fh *RWFileHandle) Release() error + func (fh *RWFileHandle) Seek(offset int64, whence int) (ret int64, err error) + func (fh *RWFileHandle) Size() int64 + func (fh *RWFileHandle) Stat() (os.FileInfo, error) + func (fh *RWFileHandle) String() string + func (fh *RWFileHandle) Sync() error + func (fh *RWFileHandle) Truncate(size int64) (err error) + func (fh *RWFileHandle) Write(b []byte) (n int, err error) + func (fh *RWFileHandle) WriteAt(b []byte, off int64) (n int, err error) + func (fh *RWFileHandle) WriteString(s string) (n int, err error) + type ReadFileHandle struct + func (fh *ReadFileHandle) Close() error + func (fh *ReadFileHandle) Flush() error + func (fh *ReadFileHandle) Node() Node + func (fh *ReadFileHandle) Read(p []byte) (n int, err error) + func (fh *ReadFileHandle) ReadAt(p []byte, off int64) (n int, err error) + func (fh *ReadFileHandle) Release() error + func (fh *ReadFileHandle) Seek(offset int64, whence int) (n int64, err error) + func (fh *ReadFileHandle) Size() int64 + func (fh *ReadFileHandle) Stat() (os.FileInfo, error) + func (fh *ReadFileHandle) String() string + func (h ReadFileHandle) Chdir() error + func (h ReadFileHandle) Chmod(mode os.FileMode) error + func (h ReadFileHandle) Chown(uid, gid int) error + func (h ReadFileHandle) Fd() uintptr + func (h ReadFileHandle) Name() string + func (h ReadFileHandle) Readdir(n int) ([]os.FileInfo, error) + func (h ReadFileHandle) Readdirnames(n int) (names []string, err error) + func (h ReadFileHandle) Sync() error + func (h ReadFileHandle) Truncate(size int64) error + func (h ReadFileHandle) Write(b []byte) (n int, err error) + func (h ReadFileHandle) WriteAt(b []byte, off int64) (n int, err error) + func (h ReadFileHandle) WriteString(s string) (n int, err error) + type VFS struct + Opt Options + func New(f fs.Fs, opt *Options) *VFS + func (vfs *VFS) CleanUp() error + func (vfs *VFS) FlushDirCache() + func (vfs *VFS) OpenFile(name string, flags int, perm os.FileMode) (fd Handle, err error) + func (vfs *VFS) Rename(oldName, newName string) error + func (vfs *VFS) Root() (*Dir, error) + func (vfs *VFS) SetCacheMode(cacheMode CacheMode) + func (vfs *VFS) Shutdown() + func (vfs *VFS) Stat(path string) (node Node, err error) + func (vfs *VFS) StatParent(name string) (dir *Dir, leaf string, err error) + func (vfs *VFS) Statfs() (total, used, free int64) + func (vfs *VFS) WaitForWriters(timeout time.Duration) + type WriteFileHandle struct + func (fh *WriteFileHandle) Close() error + func (fh *WriteFileHandle) Flush() error + func (fh *WriteFileHandle) Node() Node + func (fh *WriteFileHandle) Offset() (offset int64) + func (fh *WriteFileHandle) Read(p []byte) (n int, err error) + func (fh *WriteFileHandle) ReadAt(p []byte, off int64) (n int, err error) + func (fh *WriteFileHandle) Release() error + func (fh *WriteFileHandle) Stat() (os.FileInfo, error) + func (fh *WriteFileHandle) String() string + func (fh *WriteFileHandle) Sync() error + func (fh *WriteFileHandle) Truncate(size int64) (err error) + func (fh *WriteFileHandle) Write(p []byte) (n int, err error) + func (fh *WriteFileHandle) WriteAt(p []byte, off int64) (n int, err error) + func (fh *WriteFileHandle) WriteString(s string) (n int, err error) + func (h WriteFileHandle) Chdir() error + func (h WriteFileHandle) Chmod(mode os.FileMode) error + func (h WriteFileHandle) Chown(uid, gid int) error + func (h WriteFileHandle) Fd() uintptr + func (h WriteFileHandle) Name() string + func (h WriteFileHandle) Readdir(n int) ([]os.FileInfo, error) + func (h WriteFileHandle) Readdirnames(n int) (names []string, err error) + func (h WriteFileHandle) Seek(offset int64, whence int) (ret int64, err error)