Documentation ¶
Index ¶
- type FS
- func (fs *FS) CopyPart(srcFS common.OriginFS, p common.Part) error
- func (fs *FS) CreateFile(filePath string, data []byte) error
- func (fs *FS) DeleteFile(filePath string) error
- func (fs *FS) DeletePart(p common.Part) error
- func (fs *FS) DownloadPart(p common.Part, w io.Writer) error
- func (fs *FS) HasFile(filePath string) (bool, error)
- func (fs *FS) ListParts() ([]common.Part, error)
- func (fs *FS) MustStop()
- func (fs *FS) ReadFile(filePath string) ([]byte, error)
- func (fs *FS) RemoveEmptyDirs() error
- func (fs *FS) String() string
- func (fs *FS) UploadPart(p common.Part, r io.Reader) error
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 remote directory with backup data. Dir string }
FS represents remote filesystem.
Backups are uploaded there. Data is downloaded from there during restore.
func (*FS) CreateFile ¶ added in v1.32.1
CreateFile creates filePath at fs and puts data into it.
The file is overwritten if it exists.
func (*FS) DeleteFile ¶ added in v1.32.1
DeleteFile deletes filePath at fs.
The function does nothing if the filePath doesn't exist.
func (*FS) DeletePart ¶
DeletePart deletes the given part p from fs.
func (*FS) DownloadPart ¶
DownloadPart download part p from fs to w.
func (*FS) RemoveEmptyDirs ¶
RemoveEmptyDirs recursively removes all the empty directories in fs.
Click to show internal directories.
Click to hide internal directories.