Documentation ¶
Index ¶
- Constants
- func PauseWatcher()
- func ResumeWatcher()
- func StartWatcher(handler ChangeHandler, interval time.Duration) error
- func StopWatcher()
- type ChangeHandler
- type File
- func (f *File) Children() ([]*File, error)
- func (f *File) Client() *fh.Client
- func (f *File) Close() error
- func (f *File) CreateDir() (syncer.Syncer, error)
- func (f *File) Delete() error
- func (f *File) Deleted() bool
- func (f *File) Exists() bool
- func (f *File) ID() string
- func (f *File) IsDir() bool
- func (f *File) Modified() time.Time
- func (f *File) Open() (io.ReadCloser, error)
- func (f *File) Path(p *syncer.Profile) string
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) Rename() error
- func (f *File) SetDeleted(deleted bool)
- func (f *File) Size() int64
- func (f *File) StartMonitor(p *syncer.Profile) error
- func (f *File) StopMonitor(p *syncer.Profile) error
- func (f *File) Write(r io.ReadCloser, size int64, modTime time.Time) error
Constants ¶
const (
//LogType is the log type for remote logging
LogType = "remote"
)
Variables ¶
This section is empty.
Functions ¶
func StartWatcher ¶
func StartWatcher(handler ChangeHandler, interval time.Duration) error
StartWatcher Starts remote file system monitoring
Types ¶
type ChangeHandler ¶
ChangeHandler is the function called when a change occurs in a monitored folder
type File ¶
type File struct { Name string `json:"name"` FullURL string `json:"fullUrl"` URL string `json:"path"` ModifiedTime time.Time `json:"modified"` // contains filtered or unexported fields }
File is implements the syncer.Syncer interface for a file on the Remote machine
func (*File) Children ¶
Children returns the child files for this given File, will only return records if the file is a Dir
func (*File) Open ¶
func (f *File) Open() (io.ReadCloser, error)
Open returns a ReadWriteCloser for reading, and writing data to the file
func (*File) Path ¶
Path is the path relative to the passed in profile if path is root to the profile, then return the full path without the domain
func (*File) Rename ¶
Rename renames the file based on the filename and the time the rename function is called
func (*File) SetDeleted ¶
SetDeleted is for setting the deleted value
func (*File) StartMonitor ¶
StartMonitor starts Monitoring this syncer for changes (Dir's only)
func (*File) StopMonitor ¶
StopMonitor stops Monitoring this syncer for changes (Dir's only)