Documentation
¶
Index ¶
- func Copy(srcfs, destfs filesystem.Filespace, filterFN filesystem.LoopFilter) (err error)
- func NewReadonlyFS(fs filesystem.Filespace) filesystem.Filespace
- func NewSubFS(fs filesystem.Filespace, basePath string) filesystem.Filespace
- func StreamCopy(sourcefs, destfs filesystem.Filespace, subPath string) (err error)
- type Copier
- type ROFilespace
- func (ro ROFilespace) Copy(src, dest string) error
- func (ro ROFilespace) CopyDirectory(src, dest string) error
- func (ro ROFilespace) CopyFile(src, dest string) error
- func (ro ROFilespace) Filespace(src string) (filesystem.Filespace, error)
- func (ro ROFilespace) IsDir(src string) bool
- func (ro ROFilespace) IsExist(src string) bool
- func (ro ROFilespace) IsFile(src string) bool
- func (ro ROFilespace) Lstat(src string) (os.FileInfo, error)
- func (ro ROFilespace) MkdirAll(dest string, filemode os.FileMode) error
- func (ro ROFilespace) ReadDir(src string) ([]os.FileInfo, error)
- func (ro ROFilespace) ReadFile(src string) ([]byte, error)
- func (ro ROFilespace) Reader(src string) (filesystem.Reader, error)
- func (ro ROFilespace) Remove(dest string) error
- func (ro ROFilespace) RemoveAll(dest string) error
- func (ro ROFilespace) WriteFile(dest string, data []byte, perm os.FileMode) error
- func (ro ROFilespace) Writer(dest string) (filesystem.Writer, error)
- type SubFS
- func (sub SubFS) Copy(src, dest string) error
- func (sub SubFS) CopyDirectory(src, dest string) error
- func (sub SubFS) CopyFile(src, dest string) error
- func (sub SubFS) Filespace(src string) (filesystem.Filespace, error)
- func (sub SubFS) IsDir(src string) bool
- func (sub SubFS) IsExist(src string) bool
- func (sub SubFS) IsFile(src string) bool
- func (sub SubFS) Lstat(src string) (os.FileInfo, error)
- func (sub SubFS) MkdirAll(dest string, filemode os.FileMode) error
- func (sub SubFS) ReadDir(src string) ([]os.FileInfo, error)
- func (sub SubFS) ReadFile(src string) ([]byte, error)
- func (sub SubFS) Reader(src string) (filesystem.Reader, error)
- func (sub SubFS) Remove(dest string) error
- func (sub SubFS) RemoveAll(dest string) error
- func (sub SubFS) WriteFile(dest string, data []byte, perm os.FileMode) error
- func (sub SubFS) Writer(dest string) (filesystem.Writer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
func Copy(srcfs, destfs filesystem.Filespace, filterFN filesystem.LoopFilter) (err error)
Copy clone files from sourcefs to destfs
func NewReadonlyFS ¶
func NewReadonlyFS(fs filesystem.Filespace) filesystem.Filespace
NewReadonlyFS create readonly mask for filespace
func NewSubFS ¶
func NewSubFS(fs filesystem.Filespace, basePath string) filesystem.Filespace
NewSubFS create new sub filesystem. Related to parent filesystem and path.
func StreamCopy ¶
func StreamCopy(sourcefs, destfs filesystem.Filespace, subPath string) (err error)
StreamCopy copy file from source filesystem to destination filesystem with a stream loop
Types ¶
type Copier ¶
type Copier struct { SrcFS filesystem.Filespace SrcPath string DestFS filesystem.Filespace DestPath string }
Copier is helper to copy data bettwent two filesystem
type ROFilespace ¶
type ROFilespace struct {
// contains filtered or unexported fields
}
ROFilespace is a readonly filespace
func (ROFilespace) Copy ¶
func (ro ROFilespace) Copy(src, dest string) error
Copy method is unavailable
func (ROFilespace) CopyDirectory ¶
func (ro ROFilespace) CopyDirectory(src, dest string) error
CopyDirectory is unavailable
func (ROFilespace) CopyFile ¶
func (ro ROFilespace) CopyFile(src, dest string) error
CopyFile method is unavailable
func (ROFilespace) Filespace ¶
func (ro ROFilespace) Filespace(src string) (filesystem.Filespace, error)
Filespace create new filespace
func (ROFilespace) IsDir ¶
func (ro ROFilespace) IsDir(src string) bool
IsDir method run IsDir method of parent filespace
func (ROFilespace) IsExist ¶
func (ro ROFilespace) IsExist(src string) bool
IsExist method run IsExist method of parent filespace
func (ROFilespace) IsFile ¶
func (ro ROFilespace) IsFile(src string) bool
IsFile method run IsFile method of parent filespace
func (ROFilespace) Lstat ¶
func (ro ROFilespace) Lstat(src string) (os.FileInfo, error)
Lstat method run Lstat method of parent filespace
func (ROFilespace) MkdirAll ¶
func (ro ROFilespace) MkdirAll(dest string, filemode os.FileMode) error
MkdirAll method is unavailable
func (ROFilespace) ReadDir ¶
func (ro ROFilespace) ReadDir(src string) ([]os.FileInfo, error)
ReadDir method run ReadDir method of parent filespace
func (ROFilespace) ReadFile ¶
func (ro ROFilespace) ReadFile(src string) ([]byte, error)
ReadFile method run ReadFile method of parent filespace
func (ROFilespace) Reader ¶
func (ro ROFilespace) Reader(src string) (filesystem.Reader, error)
Reader method run Reader method of parent filespace
func (ROFilespace) Remove ¶
func (ro ROFilespace) Remove(dest string) error
Remove method is unavailable
func (ROFilespace) RemoveAll ¶
func (ro ROFilespace) RemoveAll(dest string) error
RemoveAll method is unavailable
func (ROFilespace) Writer ¶
func (ro ROFilespace) Writer(dest string) (filesystem.Writer, error)
Writer method is unavailable
type SubFS ¶
type SubFS struct {
// contains filtered or unexported fields
}
SubFS is a filespace related to a base path in other filespace
func (SubFS) CopyDirectory ¶
CopyDirectory method run CopyDirectory method of parent filesystem but in relative base path
func (SubFS) CopyFile ¶
CopyFile method run CopyFile method of parent filesystem but in relative base path
func (SubFS) Filespace ¶
func (sub SubFS) Filespace(src string) (filesystem.Filespace, error)
Filespace create new filespace
func (SubFS) IsExist ¶
IsExist method run IsExist method of parent filesystem but in relative base path
func (SubFS) IsFile ¶
IsFile method run IsFile method of parent filesystem but in relative base path
func (SubFS) MkdirAll ¶
MkdirAll method run MkdirAll method of parent filesystem but in relative base path
func (SubFS) ReadDir ¶
ReadDir method run ReadDir method of parent filesystem but in relative base path
func (SubFS) ReadFile ¶
ReadFile method run ReadFile method of parent filesystem but in relative base path
func (SubFS) Reader ¶
func (sub SubFS) Reader(src string) (filesystem.Reader, error)
Reader method run Reader method of parent filesystem but in relative base path
func (SubFS) Remove ¶
Remove method run Remove method of parent filesystem but in relative base path
func (SubFS) RemoveAll ¶
RemoveAll method run RemoveAll method of parent filesystem but in relative base path