sync: Add Init and Sync functions
Init initializes the directory/repository before the first use. Sync is called to unsure the directory is up-to-date.
This commit is contained in:
parent
281056a723
commit
aebfb7bf96
7 changed files with 62 additions and 6 deletions
|
@ -19,6 +19,10 @@ import (
|
|||
type Importer interface {
|
||||
// Kind returns information about the Importer, for human interrest.
|
||||
Kind() string
|
||||
// init performs the importer initialization.
|
||||
Init() error
|
||||
// sync tries to pull the latest modification of the underlying storage.
|
||||
Sync() error
|
||||
// exists checks if the given location exists from the Importer point of view.
|
||||
exists(filename string) bool
|
||||
// toURL gets the full path/URL to the given file, the Importer will look internaly (used for debuging purpose).
|
||||
|
|
Reference in a new issue