Documentation ¶
Overview ¶
Package lfs inclues a local file system
Index ¶
- func Check(source string, destination string) error
- func Dir(p string) string
- func Split(p string) []string
- type LocalDirectoryEntry
- type LocalFile
- func (lf *LocalFile) Close() error
- func (lf *LocalFile) Name() string
- func (lf *LocalFile) Read(s []byte) (int, error)
- func (lf *LocalFile) Seek(offset int64, whence int) (int64, error)
- func (lf *LocalFile) Write(s []byte) (int, error)
- func (lf *LocalFile) WriteAt(s []byte, o int64) (int, error)
- func (lf *LocalFile) WriteTo(ctx context.Context, w fs.Writer) (int64, error)
- type LocalFileInfo
- type LocalFileSystem
- func (lfs *LocalFileSystem) Chtimes(ctx context.Context, name string, atime time.Time, mtime time.Time) error
- func (lfs *LocalFileSystem) Copy(ctx context.Context, input *fs.CopyInput) error
- func (lfs *LocalFileSystem) Dir(name string) string
- func (lfs *LocalFileSystem) IsNotExist(err error) bool
- func (lfs *LocalFileSystem) Join(name ...string) string
- func (lfs *LocalFileSystem) MagicNumber(ctx context.Context, name string) ([]byte, error)
- func (lfs *LocalFileSystem) MagicNumbers(ctx context.Context, names []string, threads int) ([][]byte, error)
- func (lfs *LocalFileSystem) MkdirAll(ctx context.Context, name string, mode os.FileMode) error
- func (lfs *LocalFileSystem) MustRelative(ctx context.Context, base string, target string) string
- func (lfs *LocalFileSystem) Open(ctx context.Context, name string) (fs.Object, error)
- func (lfs *LocalFileSystem) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (fs.File, error)
- func (lfs *LocalFileSystem) OpenObject(ctx context.Context, name string, flag int, perm os.FileMode) (fs.Object, error)
- func (lfs *LocalFileSystem) ReadDir(ctx context.Context, name string, recursive bool) ([]fs.DirectoryEntryInterface, error)
- func (lfs *LocalFileSystem) ReadFile(ctx context.Context, name string, data []byte) (int, error)
- func (lfs *LocalFileSystem) Relative(ctx context.Context, basepath string, targetpath string) (string, error)
- func (lfs *LocalFileSystem) RemoveDirectories(ctx context.Context, names []string, recursive bool) error
- func (lfs *LocalFileSystem) RemoveDirectory(ctx context.Context, name string, recursive bool) error
- func (lfs *LocalFileSystem) RemoveFile(ctx context.Context, name string) error
- func (lfs *LocalFileSystem) RemoveFiles(ctx context.Context, names []string) error
- func (lfs *LocalFileSystem) Root() string
- func (lfs *LocalFileSystem) Size(ctx context.Context, name string) (int64, error)
- func (lfs *LocalFileSystem) Stat(ctx context.Context, name string) (fs.FileInfo, error)
- func (lfs *LocalFileSystem) Sync(ctx context.Context, input *fs.SyncInput) (int, error)
- func (lfs *LocalFileSystem) SyncDirectory(ctx context.Context, input *fs.SyncDirectoryInput) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LocalDirectoryEntry ¶
type LocalDirectoryEntry struct {
// contains filtered or unexported fields
}
func (*LocalDirectoryEntry) IsDir ¶
func (lde *LocalDirectoryEntry) IsDir() bool
func (*LocalDirectoryEntry) MarshalJSON ¶
func (lde *LocalDirectoryEntry) MarshalJSON() ([]byte, error)
func (*LocalDirectoryEntry) ModTime ¶
func (lde *LocalDirectoryEntry) ModTime() time.Time
func (*LocalDirectoryEntry) Name ¶
func (lde *LocalDirectoryEntry) Name() string
func (*LocalDirectoryEntry) Size ¶
func (lde *LocalDirectoryEntry) Size() int64
func (*LocalDirectoryEntry) String ¶
func (lde *LocalDirectoryEntry) String() string
type LocalFile ¶
type LocalFile struct {
// contains filtered or unexported fields
}
func NewLocalFile ¶
type LocalFileInfo ¶
type LocalFileInfo struct {
// contains filtered or unexported fields
}
func NewLocalFileInfo ¶
func (*LocalFileInfo) IsDir ¶
func (fi *LocalFileInfo) IsDir() bool
func (*LocalFileInfo) ModTime ¶
func (fi *LocalFileInfo) ModTime() time.Time
func (*LocalFileInfo) Name ¶
func (fi *LocalFileInfo) Name() string
func (*LocalFileInfo) Size ¶
func (fi *LocalFileInfo) Size() int64
func (*LocalFileInfo) String ¶
func (fi *LocalFileInfo) String() string
type LocalFileSystem ¶
type LocalFileSystem struct {
// contains filtered or unexported fields
}
func NewLocalFileSystem ¶
func NewLocalFileSystem(rootPath string) *LocalFileSystem
func NewReadOnlyLocalSystem ¶
func NewReadOnlyLocalSystem(rootPath string) *LocalFileSystem
func (*LocalFileSystem) Dir ¶
func (lfs *LocalFileSystem) Dir(name string) string
func (*LocalFileSystem) IsNotExist ¶
func (lfs *LocalFileSystem) IsNotExist(err error) bool
func (*LocalFileSystem) Join ¶
func (lfs *LocalFileSystem) Join(name ...string) string
func (*LocalFileSystem) MagicNumber ¶
func (*LocalFileSystem) MagicNumbers ¶
func (lfs *LocalFileSystem) MagicNumbers(ctx context.Context, names []string, threads int) ([][]byte, error)
MagicNumbers retrieves the magic numbers for the files with the names in the array. If an element is empty, then skips.
func (*LocalFileSystem) MustRelative ¶
func (*LocalFileSystem) OpenObject ¶
func (*LocalFileSystem) ReadDir ¶
func (lfs *LocalFileSystem) ReadDir(ctx context.Context, name string, recursive bool) ([]fs.DirectoryEntryInterface, error)
func (*LocalFileSystem) RemoveDirectories ¶
func (*LocalFileSystem) RemoveDirectory ¶
func (*LocalFileSystem) RemoveFile ¶
func (lfs *LocalFileSystem) RemoveFile(ctx context.Context, name string) error
func (*LocalFileSystem) RemoveFiles ¶
func (lfs *LocalFileSystem) RemoveFiles(ctx context.Context, names []string) error
func (*LocalFileSystem) Root ¶
func (lfs *LocalFileSystem) Root() string
func (*LocalFileSystem) Sync ¶
Sync synchronizes the input directory to the output directory in the local file system
func (*LocalFileSystem) SyncDirectory ¶
func (lfs *LocalFileSystem) SyncDirectory(ctx context.Context, input *fs.SyncDirectoryInput) (int, error)
Click to show internal directories.
Click to hide internal directories.