public PluginMethodReturnValueType Shell(FileCopyArgs CopyArgs) { var result = FileUtil.FileCopy(CopyArgs.SourcePath, CopyArgs.DestPath, CopyArgs.FailIfExists); return new PluginMethodReturnValueType() { DataType = PluginMethodReturnValueType.StringDataType, Data = JsonConvert.SerializeObject(result), }; }
public static string MakeFileCopyCommand(string sourcePath, string destPath, bool failIfExists) { var args = new FileCopyArgs() { SourcePath = sourcePath, DestPath = destPath, FailIfExists = failIfExists, }; var argsSerialize = JsonConvert.SerializeObject(args); return PluginCommandSerializeMaker.MakeCommand(InnerPluginName, "FileCopy", argsSerialize); }
public string Shell(FileCopyArgs CopyArgs) { var result = FileUtil.FileCopy(CopyArgs.SourcePath, CopyArgs.DestPath, CopyArgs.FailIfExists); return JsonConvert.SerializeObject(result); }