Documentation ¶
Index ¶
- type FS
- func (fs *FS) DeletePath(path string) (uint64, error)
- func (fs *FS) Init() error
- func (fs *FS) ListParts() ([]common.Part, error)
- func (fs *FS) MustStop()
- func (fs *FS) NewReadCloser(p common.Part) (io.ReadCloser, error)
- func (fs *FS) NewWriteCloser(p common.Part) (io.WriteCloser, error)
- func (fs *FS) RemoveEmptyDirs() error
- func (fs *FS) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct { // Dir is a path to local directory to work with. Dir string // MaxBytesPerSecond is the maximum bandwidth usage during backups or restores. MaxBytesPerSecond int // contains filtered or unexported fields }
FS represents local filesystem.
Backups are made from local fs. Data is restored from backups to local fs.
func (*FS) DeletePath ¶
DeletePath deletes the given path from fs and returns the size for the deleted file.
The path must be in canonical form, e.g. it must have `/` directory separators
func (*FS) Init ¶ added in v1.29.5
Init initializes fs.
The returned fs must be stopped when no long needed with MustStop call.
func (*FS) NewReadCloser ¶
NewReadCloser returns io.ReadCloser for the given part p located in fs.
func (*FS) NewWriteCloser ¶
NewWriteCloser returns io.WriteCloser for the given part p located in fs.
func (*FS) RemoveEmptyDirs ¶
RemoveEmptyDirs recursively removes all the empty directories in fs.
Click to show internal directories.
Click to hide internal directories.