Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrFileOverDir is thrown when trying to overwrite a non-empty directory with a file ErrFileOverDir = errors.New( "fsync: trying to overwrite a non-empty directory with a file") )
Functions ¶
Types ¶
type Syncer ¶
type Syncer struct {
// Set this to true to delete files in the destination that don't exist
// in the source.
Delete bool
// To allow certain files to remain in the destination, implement this function.
// Return true to skip file, false to delete.
DeleteFilter func(f os.FileInfo) bool
// By default, modification times are synced. This can be turned off by
// setting this to true.
NoTimes bool
// NoChmod disables permission mode syncing.
NoChmod bool
SrcFs afero.Fs
DestFs afero.Fs
//PoolMax defines max concurrent sync operations
PoolMax int
// contains filtered or unexported fields
}
Syncer provides functions for syncing files.
func NewSyncer ¶
func NewSyncer() *Syncer
NewSyncer creates a new instance of Syncer with default options.
Click to show internal directories.
Click to hide internal directories.