Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Server = {
- ServerId : int;
- ServerName : string;
- ServerAddress : string;
- UserName : string option;
- Password : string option;
- }
- type FileTransferDefinition = {
- FileTransferDefinitionId : int;
- FileTransferDefinitionName : string;
- FileTransferTypeId : int;
- FileTransferTypeName : string;
- FileNameIncludeFilter : string;
- FileNameExcludeFilter : string option;
- SourceServerId : int;
- SourceServerAddress : string;
- RelativeSourcePath : string;
- AbsoluteSourcePath : string;
- TargetServerId : int;
- TargetServerAddress : string;
- RelativeTargetPath : string;
- AbsoluteTargetPath : string;
- }
- type FileTransferTypeData = {
- FileTransferTypeId : int;
- FileTransferTypeName : string;
- }
- type FileTransferType =
- | Move of FileTransferTypeData
- | Copy of FileTransferTypeData
- // move '*.(ts|mpg|mov|mxf)' from '$(source)/path/here' to '$(target)/path/here'
- // copy '*.(ts|mpg|mov|mxf)' from '$(source)/path/here' to '$(target)/path/here'
- let updateSourcePath transfer path =
- { transfer with
- RelativeSourcePath = path;
- AbsoluteSourcePath = transfer.SourceServerAddress + path }
- let updateSourceServer transfer server =
- { transfer with
- SourceServerId = server.ServerId;
- SourceServerAddress = server.ServerAddress;
- AbsoluteSourcePath = server.ServerAddress + transfer.RelativeSourcePath
- }
- let updateTargetPath transfer path =
- { transfer with
- RelativeSourcePath = path;
- AbsoluteSourcePath = transfer.TargetServerAddress + path }
- let updateTargetServer transfer server =
- { transfer with
- TargetServerId = server.ServerId;
- TargetServerAddress = server.ServerAddress;
- AbsoluteTargetPath = server.ServerAddress + transfer.RelativeTargetPath
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement