Documentation ¶
Index ¶
- Variables
- func EvaluatePath(fs vfs.FileSystem, root FileDataDirAccess, name string, link ...bool) (FileDataDirAccess, string, FileDataDirAccess, string, error)
- func NewFSSupport(name string, root FileData, adapter SupportAdapter) vfs.FileSystem
- func NewFileInfo(name string, file FileData) os.FileInfo
- func NewRenamedFile(name string, file vfs.File) vfs.File
- type File
- func (f *File) Close() error
- func (f *File) Name() string
- func (f *File) Open() error
- func (f *File) Read(buf []byte) (int, error)
- func (f *File) ReadAt(b []byte, off int64) (n int, err error)
- func (f *File) ReadDir(count int) (files []fs.DirEntry, err error)
- func (f *File) Readdir(count int) (files []os.FileInfo, err error)
- func (f *File) Readdirnames(n int) (names []string, err error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync() error
- func (f *File) Truncate(size int64) error
- func (f *File) Write(buf []byte) (int, error)
- func (f *File) WriteAt(buf []byte, off int64) (n int, err error)
- func (f *File) WriteString(s string) (ret int, err error)
- type FileData
- type FileDataDirAccess
- type FileSystemBase
- type FileSystemSupport
- func (m *FileSystemSupport) Chmod(name string, mode os.FileMode) error
- func (m *FileSystemSupport) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (m *FileSystemSupport) Create(name string) (vfs.File, error)
- func (m *FileSystemSupport) Lstat(name string) (os.FileInfo, error)
- func (m *FileSystemSupport) Mkdir(name string, perm os.FileMode) error
- func (m *FileSystemSupport) MkdirAll(path string, perm os.FileMode) error
- func (m *FileSystemSupport) Name() string
- func (m *FileSystemSupport) Open(name string) (vfs.File, error)
- func (m *FileSystemSupport) OpenFile(name string, flags int, perm os.FileMode) (vfs.File, error)
- func (m *FileSystemSupport) Readlink(name string) (string, error)
- func (m *FileSystemSupport) Remove(name string) error
- func (m *FileSystemSupport) RemoveAll(name string) error
- func (m *FileSystemSupport) Rename(oldname, newname string) error
- func (m *FileSystemSupport) Stat(name string) (os.FileInfo, error)
- func (m *FileSystemSupport) Symlink(oldname, newname string) error
- type FilesSorter
- type MappedFileSystem
- func (m *MappedFileSystem) Base() vfs.FileSystem
- func (m *MappedFileSystem) Chmod(name string, mode os.FileMode) (err error)
- func (m *MappedFileSystem) Chtimes(name string, atime, mtime time.Time) (err error)
- func (m *MappedFileSystem) Cleanup() error
- func (m *MappedFileSystem) Create(name string) (f vfs.File, err error)
- func (m *MappedFileSystem) FSTempDir() string
- func (*MappedFileSystem) Getwd() (string, error)
- func (m *MappedFileSystem) Lstat(name string) (os.FileInfo, error)
- func (m *MappedFileSystem) Mkdir(name string, mode os.FileMode) (err error)
- func (m *MappedFileSystem) MkdirAll(name string, mode os.FileMode) (err error)
- func (m *MappedFileSystem) Normalize(path string) string
- func (m *MappedFileSystem) Open(name string) (f vfs.File, err error)
- func (m *MappedFileSystem) OpenFile(name string, flag int, mode os.FileMode) (f vfs.File, err error)
- func (m *MappedFileSystem) Readlink(name string) (string, error)
- func (m *MappedFileSystem) Remove(name string) (err error)
- func (m *MappedFileSystem) RemoveAll(name string) (err error)
- func (m *MappedFileSystem) Rename(oldname, newname string) (err error)
- func (m *MappedFileSystem) Stat(name string) (fi os.FileInfo, err error)
- func (m *MappedFileSystem) Symlink(oldname, newname string) error
- type PathMapper
- type RenamedFile
- type SupportAdapter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotDir = vfs.ErrNotDir ErrReadOnly = vfs.ErrReadOnly ErrFileClosed = errors.New("file is closed") ErrOutOfRange = errors.New("out of range") ErrTooLarge = errors.New("too large") ErrNotEmpty = vfs.ErrNotEmpty )
Functions ¶
func EvaluatePath ¶
func EvaluatePath(fs vfs.FileSystem, root FileDataDirAccess, name string, link ...bool) (FileDataDirAccess, string, FileDataDirAccess, string, error)
func NewFSSupport ¶
func NewFSSupport(name string, root FileData, adapter SupportAdapter) vfs.FileSystem
Types ¶
type FileDataDirAccess ¶
type FileSystemBase ¶
type FileSystemBase struct{}
func (FileSystemBase) Cleanup ¶
func (FileSystemBase) Cleanup() error
func (FileSystemBase) FSTempDir ¶
func (FileSystemBase) FSTempDir() string
func (FileSystemBase) Getwd ¶
func (FileSystemBase) Getwd() (string, error)
func (FileSystemBase) Normalize ¶
func (FileSystemBase) Normalize(path string) string
func (FileSystemBase) VolumeName ¶
func (FileSystemBase) VolumeName(name string) string
type FileSystemSupport ¶
type FileSystemSupport struct { FileSystemBase // contains filtered or unexported fields }
func (*FileSystemSupport) Chmod ¶
func (m *FileSystemSupport) Chmod(name string, mode os.FileMode) error
func (*FileSystemSupport) Create ¶
func (m *FileSystemSupport) Create(name string) (vfs.File, error)
func (*FileSystemSupport) Lstat ¶
func (m *FileSystemSupport) Lstat(name string) (os.FileInfo, error)
func (*FileSystemSupport) Mkdir ¶
func (m *FileSystemSupport) Mkdir(name string, perm os.FileMode) error
func (*FileSystemSupport) MkdirAll ¶
func (m *FileSystemSupport) MkdirAll(path string, perm os.FileMode) error
func (*FileSystemSupport) Name ¶
func (m *FileSystemSupport) Name() string
func (*FileSystemSupport) Readlink ¶
func (m *FileSystemSupport) Readlink(name string) (string, error)
func (*FileSystemSupport) Remove ¶
func (m *FileSystemSupport) Remove(name string) error
func (*FileSystemSupport) RemoveAll ¶
func (m *FileSystemSupport) RemoveAll(name string) error
func (*FileSystemSupport) Rename ¶
func (m *FileSystemSupport) Rename(oldname, newname string) error
func (*FileSystemSupport) Symlink ¶
func (m *FileSystemSupport) Symlink(oldname, newname string) error
type FilesSorter ¶
func (FilesSorter) Len ¶
func (s FilesSorter) Len() int
func (FilesSorter) Less ¶
func (s FilesSorter) Less(i, j int) bool
func (FilesSorter) Swap ¶
func (s FilesSorter) Swap(i, j int)
type MappedFileSystem ¶
type MappedFileSystem struct { FileSystemBase // contains filtered or unexported fields }
func NewMappedFileSystem ¶
func NewMappedFileSystem(root vfs.FileSystem, mapper PathMapper) *MappedFileSystem
func (*MappedFileSystem) Base ¶
func (m *MappedFileSystem) Base() vfs.FileSystem
func (*MappedFileSystem) Chmod ¶
func (m *MappedFileSystem) Chmod(name string, mode os.FileMode) (err error)
func (*MappedFileSystem) Chtimes ¶
func (m *MappedFileSystem) Chtimes(name string, atime, mtime time.Time) (err error)
func (*MappedFileSystem) Cleanup ¶
func (m *MappedFileSystem) Cleanup() error
func (*MappedFileSystem) Create ¶
func (m *MappedFileSystem) Create(name string) (f vfs.File, err error)
func (*MappedFileSystem) FSTempDir ¶
func (m *MappedFileSystem) FSTempDir() string
func (*MappedFileSystem) Getwd ¶
func (*MappedFileSystem) Getwd() (string, error)
func (*MappedFileSystem) Mkdir ¶
func (m *MappedFileSystem) Mkdir(name string, mode os.FileMode) (err error)
func (*MappedFileSystem) MkdirAll ¶
func (m *MappedFileSystem) MkdirAll(name string, mode os.FileMode) (err error)
func (*MappedFileSystem) Normalize ¶
func (m *MappedFileSystem) Normalize(path string) string
func (*MappedFileSystem) Open ¶
func (m *MappedFileSystem) Open(name string) (f vfs.File, err error)
func (*MappedFileSystem) Readlink ¶
func (m *MappedFileSystem) Readlink(name string) (string, error)
func (*MappedFileSystem) Remove ¶
func (m *MappedFileSystem) Remove(name string) (err error)
func (*MappedFileSystem) RemoveAll ¶
func (m *MappedFileSystem) RemoveAll(name string) (err error)
func (*MappedFileSystem) Rename ¶
func (m *MappedFileSystem) Rename(oldname, newname string) (err error)
func (*MappedFileSystem) Stat ¶
func (m *MappedFileSystem) Stat(name string) (fi os.FileInfo, err error)
func (*MappedFileSystem) Symlink ¶
func (m *MappedFileSystem) Symlink(oldname, newname string) error
type PathMapper ¶
type PathMapper interface {
MapPath(path string) (vfs.FileSystem, string)
}
type RenamedFile ¶
func (*RenamedFile) Name ¶
func (r *RenamedFile) Name() string
Click to show internal directories.
Click to hide internal directories.