Documentation ¶
Index ¶
- Variables
- type Directory
- type File
- type FileCompareError
- type UnknownFileError
- type Walkie
- func (w *Walkie) CleanDir(ref Directory) (nb int, err error)
- func (w *Walkie) CleanFiles(ref Directory) (nb int, err error)
- func (w *Walkie) Close()
- func (w *Walkie) CopyDir(ref Directory) (nb int, err error)
- func (w *Walkie) Explore() (err error)
- func (w *Walkie) GetDir(path string) (dir Directory, found bool)
- func (w *Walkie) GetFile(path string) (file File, found bool)
- func (w *Walkie) ListDirs() (files []string)
- func (w *Walkie) ListFiles() (files []string)
- func (w *Walkie) Stat() (nbdir, nbfiles int)
- func (w *Walkie) SyncDir(ref Directory) (add, del int, err error)
- func (w *Walkie) UpdateOrCreateFile(path string, r io.Reader, original_file File) (err error)
- func (w *Walkie) Watch()
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "X.X.X"
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct { Name string `json:"name"` // Mtime time.Time `json:"mtime"` Files map[string]*File `json:"files"` Directories map[string]*Directory `json:"directories"` // contains filtered or unexported fields }
A Directory with files
func (Directory) DeepEquals ¶
Equals check recursively if Directory f == Directory x
type File ¶
type File struct { Name string `json:"name"` Mtime time.Time `json:"mtime"` Size int64 `json:"size"` SHA256 string `json:"sha256"` // contains filtered or unexported fields }
A File in the path
type FileCompareError ¶ added in v0.2.0
type FileCompareError struct {
// contains filtered or unexported fields
}
func (FileCompareError) Error ¶ added in v0.2.0
func (e FileCompareError) Error() string
type UnknownFileError ¶ added in v0.2.0
type UnknownFileError struct {
// contains filtered or unexported fields
}
func (UnknownFileError) Error ¶ added in v0.2.0
func (e UnknownFileError) Error() string
type Walkie ¶
type Walkie struct { Directory *Directory // contains filtered or unexported fields }
Walkie service We expect Directory to always be synced
func (*Walkie) CleanFiles ¶
Delete files, return number of changed files
func (*Walkie) UpdateOrCreateFile ¶
Create or update a file (use slashes as path)
Click to show internal directories.
Click to hide internal directories.