# TargetExist

TargetExist Enum

Options for the target file exists when transferring files

Fields

Skip | 0 | Skip transfer
Resume | 1 | Continue the transfer
Overwrite | 2 | Transfer from start
Rename | 3 | Rename the target file
Ask | 4 | Ask the user
Setting | 5 | According to user settings

Examples

TargetExistRule rule_server_to_local = new TargetExistRule { TargetIsSmaller = TargetExist.Overwrite, TargetIsSame = TargetExist.Overwrite, TargetIsLarger = TargetExist.Overwrite}; TargetExistRule rule_local_to_server = new TargetExistRule { TargetIsSmaller = TargetExist.Resume, TargetIsSame = TargetExist.Resume, TargetIsLarger = TargetExist.Resume}; TargetExistRule rule_server_to_server = new TargetExistRule { TargetIsSmaller = TargetExist.Ask, TargetIsSame = TargetExist.Ask, TargetIsLarger = TargetExist.Ask}; //For global options Option.Setting.TargetExistRules[0] = rule_server_to_local; //TargetExistRules[0] for transfer from server to local Option.Setting.TargetExistRules[1] = rule_local_to_server; //TargetExistRules[0] for transfer from server to local Option.Setting.TargetExistRules[2] = rule_server_to_server; //TargetExistRules[0] for transfer from server to local //For a specific server Server dropbox_server = new Server { Protocol = ServerProtocol.DropBox}; dropbox_server.TargetExistRules[0] = rule_server_to_local; //TargetExistRules[0] for transfer from server to local dropbox_server.TargetExistRules[1] = rule_local_to_server; //TargetExistRules[1] for transfer from local to server dropbox_server.TargetExistRules[2] = rule_server_to_server; //TargetExistRules[2] for transfer from server to server dropbox_server.OverwriteGlobalFileExistRules = true; Site.Add("target_exit_test",dropbox_server);

See Also

- TargetExistRule
- Server
- Site