Documentation
¶
Index ¶
- Constants
- Variables
- func ListFilesFromSyncMap(runtime *app.Runtime, sync_map SyncMap)
- func Main(runtime *app.Runtime, args *Args)
- func SyncFiles(session *rpc.RPC, files SyncMap, source string, target string, ...) error
- type Args
- type MakeFolderHandler
- type ProgressHandler
- type SyncFile
- type SyncMap
- type SyncStatus
- type TransferDirection
- type TransferOperation
Constants ¶
View Source
const Command = "sync"
View Source
const NotExistingFile = "-"
Variables ¶
View Source
var ErrFileUnknown = errors.New("unknown file")
Functions ¶
func ListFilesFromSyncMap ¶
Types ¶
type Args ¶
type Args struct {
DryRun bool `arg:"-d,--dry-run" help:"Do a dry run, don't upload, download or delete any files." default:"false"`
Force bool `arg:"-f,--force" help:"Upload without any similarity checks." default:"false"`
List bool `arg:"-l,--list" help:"List matching files." default:"false"`
Local bool `arg:"-o,--local" help:"List matching files from local source only." default:"false"`
Source string `arg:"-s,--source" help:"Sync all from source to target. If source is a folder, target is also treated as a folder."`
Target string `arg:"-t,--target" help:"Sync all from source to target."`
}
type MakeFolderHandler ¶
type MakeFolderHandler func(dry_run bool, direction TransferDirection, source string, target string)
type ProgressHandler ¶
type ProgressHandler func(direction TransferDirection, operation TransferOperation, dry_run bool, source string, target string, progress float32)
type SyncFile ¶
type SyncFile struct {
Status SyncStatus
Source *contract.File
Target *contract.File
}
type SyncMap ¶
func GetLocalSyncMap ¶
type SyncStatus ¶
type SyncStatus string
const ( SyncStatus_Local SyncStatus = "< " SyncStatus_Both SyncStatus = "<>" SyncStatus_Orphan SyncStatus = " >" )
type TransferDirection ¶
type TransferDirection string
const ( TransferDirection_Upload TransferDirection = ">" TransferDirection_Download TransferDirection = "<" TransferDirection_None TransferDirection = ":" )
type TransferOperation ¶
type TransferOperation string
const ( TransferOperation_Handle TransferOperation = "HNDL" TransferOperation_Delete TransferOperation = "DELT" TransferOperation_Ignore TransferOperation = "IGNR" TransferOperation_Skip TransferOperation = "SKIP" )
Click to show internal directories.
Click to hide internal directories.