# TargetExistRule

TargetExistRule Class

The Rule applied during file transfer

Fields

TargetIsSmaller | TargetExist | Target file size is smaller than source file, default is Ask
TargetIsSame | TargetExist | Target file size equal to the source file, default is Ask
TargetIsLarger | TargetExist | Target file size is larger than the source file, default is Ask

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

- TargetExist
- Server
- Site
- Option
- Setting