func checkUploadArgs(args cli.Arguments) { if args.Bool("recursive") && args.Bool("delete") { ExitF("--delete is not allowed for recursive uploads") } if args.Bool("recursive") && args.Bool("share") { ExitF("--share is not allowed for recursive uploads") } }
func conflictResolution(args cli.Arguments) drive.ConflictResolution { keepLocal := args.Bool("keepLocal") keepRemote := args.Bool("keepRemote") keepLargest := args.Bool("keepLargest") if (keepLocal && keepRemote) || (keepLocal && keepLargest) || (keepRemote && keepLargest) { ExitF("Only one conflict resolution flag can be given") } if keepLocal { return drive.KeepLocal } if keepRemote { return drive.KeepRemote } if keepLargest { return drive.KeepLargest } return drive.NoResolution }
func checkDownloadArgs(args cli.Arguments) { if args.Bool("recursive") && args.Bool("delete") { ExitF("--delete is not allowed for recursive downloads") } }