Documentation
¶
Index ¶
- func CheckForFileData(fs FileSystem, url, mount string) (data []byte, mime, path string, ok bool)
- func EnumerateCheckPaths(src string) (checkPaths []string)
- func FileExists(path string) (exists bool)
- func FindFileMime(path string) (mime string, err error)
- func FindFileShasum(path string) (shasum string, err error)
- func ListAllDirs(path string) (dirs []string, err error)
- func ListAllFiles(path string) (files []string, err error)
- func ListDirs(path string) (dirs []string, err error)
- func ListFiles(path string) (files []string, err error)
- func RegisterFileSystem(mount string, f FileSystem)
- func RegisteredFileSystems() (registered map[string][]FileSystem)
- type File
- type FileSystem
- type RWFileSystem
- type WrapFileSystem
- func (w WrapFileSystem) Exists(path string) (exists bool)
- func (w WrapFileSystem) FileCreated(path string) (created int64, err error)
- func (w WrapFileSystem) FileStats(path string) (mime, shasum string, created, updated time.Time, err error)
- func (w WrapFileSystem) LastModified(path string) (updated int64, err error)
- func (w WrapFileSystem) ListAllDirs(path string) (paths []string, err error)
- func (w WrapFileSystem) ListAllFiles(path string) (paths []string, err error)
- func (w WrapFileSystem) ListDirs(path string) (paths []string, err error)
- func (w WrapFileSystem) ListFiles(path string) (paths []string, err error)
- func (w WrapFileSystem) MimeType(path string) (mime string, err error)
- func (w WrapFileSystem) Name() (name string)
- func (w WrapFileSystem) Open(path string) (file fs.File, err error)
- func (w WrapFileSystem) ReadDir(path string) (entries []fs.DirEntry, err error)
- func (w WrapFileSystem) ReadFile(path string) (data []byte, err error)
- func (w WrapFileSystem) Shasum(path string) (shasum string, err error)
- type WrapRWFileSystem
- func (w WrapRWFileSystem) MakeDir(path string, perm os.FileMode) (err error)
- func (w WrapRWFileSystem) MakeDirAll(path string, perm os.FileMode) (err error)
- func (w WrapRWFileSystem) Remove(path string) (err error)
- func (w WrapRWFileSystem) RemoveAll(path string) (err error)
- func (w WrapRWFileSystem) WriteFile(path string, data []byte, perm os.FileMode) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForFileData ¶
func CheckForFileData(fs FileSystem, url, mount string) (data []byte, mime, path string, ok bool)
func EnumerateCheckPaths ¶
func FileExists ¶
func FindFileMime ¶
func FindFileShasum ¶
func ListAllDirs ¶
func ListAllFiles ¶
func RegisterFileSystem ¶
func RegisterFileSystem(mount string, f FileSystem)
func RegisteredFileSystems ¶
func RegisteredFileSystems() (registered map[string][]FileSystem)
Types ¶
type FileSystem ¶
type FileSystem interface { Name() (name string) Open(path string) (fh fs.File, err error) ListDirs(path string) (paths []string, err error) ListFiles(path string) (paths []string, err error) ListAllDirs(path string) (paths []string, err error) ListAllFiles(path string) (paths []string, err error) ReadDir(path string) (paths []fs.DirEntry, err error) ReadFile(path string) (content []byte, err error) MimeType(path string) (mime string, err error) Shasum(path string) (shasum string, err error) FileCreated(path string) (created int64, err error) LastModified(path string) (dateTime int64, err error) Exists(path string) (exists bool) FileStats(path string) (mime, shasum string, created, updated time.Time, err error) }
func Wrap ¶
func Wrap(path string, fs FileSystem) (out FileSystem, err error)
type RWFileSystem ¶ added in v0.1.0
type RWFileSystem interface { FileSystem MakeDir(path string, perm os.FileMode) (err error) MakeDirAll(path string, perm os.FileMode) (err error) WriteFile(path string, data []byte, perm os.FileMode) (err error) Remove(path string) (err error) RemoveAll(path string) (err error) }
func WrapRW ¶ added in v0.1.0
func WrapRW(path string, fs RWFileSystem) (out RWFileSystem, err error)
type WrapFileSystem ¶
type WrapFileSystem struct {
// contains filtered or unexported fields
}
func (WrapFileSystem) Exists ¶
func (w WrapFileSystem) Exists(path string) (exists bool)
func (WrapFileSystem) FileCreated ¶
func (w WrapFileSystem) FileCreated(path string) (created int64, err error)
func (WrapFileSystem) LastModified ¶
func (w WrapFileSystem) LastModified(path string) (updated int64, err error)
func (WrapFileSystem) ListAllDirs ¶
func (w WrapFileSystem) ListAllDirs(path string) (paths []string, err error)
func (WrapFileSystem) ListAllFiles ¶
func (w WrapFileSystem) ListAllFiles(path string) (paths []string, err error)
func (WrapFileSystem) ListDirs ¶
func (w WrapFileSystem) ListDirs(path string) (paths []string, err error)
func (WrapFileSystem) ListFiles ¶
func (w WrapFileSystem) ListFiles(path string) (paths []string, err error)
func (WrapFileSystem) MimeType ¶
func (w WrapFileSystem) MimeType(path string) (mime string, err error)
func (WrapFileSystem) Name ¶
func (w WrapFileSystem) Name() (name string)
func (WrapFileSystem) ReadDir ¶
func (w WrapFileSystem) ReadDir(path string) (entries []fs.DirEntry, err error)
type WrapRWFileSystem ¶ added in v0.1.0
type WrapRWFileSystem struct { WrapFileSystem // contains filtered or unexported fields }
func (WrapRWFileSystem) MakeDir ¶ added in v0.1.0
func (w WrapRWFileSystem) MakeDir(path string, perm os.FileMode) (err error)
func (WrapRWFileSystem) MakeDirAll ¶ added in v0.1.0
func (w WrapRWFileSystem) MakeDirAll(path string, perm os.FileMode) (err error)
func (WrapRWFileSystem) Remove ¶ added in v0.1.0
func (w WrapRWFileSystem) Remove(path string) (err error)
func (WrapRWFileSystem) RemoveAll ¶ added in v0.1.0
func (w WrapRWFileSystem) RemoveAll(path string) (err error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.