本文整理汇总了C#中IActivityIOOperationsEndPoint.CreateDirectory方法的典型用法代码示例。如果您正苦于以下问题:C# IActivityIOOperationsEndPoint.CreateDirectory方法的具体用法?C# IActivityIOOperationsEndPoint.CreateDirectory怎么用?C# IActivityIOOperationsEndPoint.CreateDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IActivityIOOperationsEndPoint
的用法示例。
在下文中一共展示了IActivityIOOperationsEndPoint.CreateDirectory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RecursiveCopy
void RecursiveCopy(IActivityIOOperationsEndPoint src, IActivityIOOperationsEndPoint dst, Dev2CRUDOperationTO args)
{
try
{
// List directory contents
var srcContentsFolders = src.ListFoldersInDirectory(src.IOPath);
Task.WaitAll(srcContentsFolders.Select(sourcePath => Task.Run(() =>
{
var sourceEndPoint =
ActivityIOFactory.CreateOperationEndPointFromIOPath(sourcePath);
IList<string> dirParts =
sourceEndPoint.IOPath.Path.Split(sourceEndPoint.PathSeperator().ToCharArray(),
StringSplitOptions.RemoveEmptyEntries);
var destinationPath =
ActivityIOFactory.CreatePathFromString(dst.Combine(dirParts.Last()), dst.IOPath.Username,
dst.IOPath.Password, true, dst.IOPath.PrivateKeyFile);
var destinationEndPoint =
ActivityIOFactory.CreateOperationEndPointFromIOPath(destinationPath);
dst.CreateDirectory(destinationPath, args);
TransferDirectoryContents(sourceEndPoint, destinationEndPoint, args);
})).ToArray());
}
catch(AggregateException e)
{
var message = e.InnerExceptions.Where(exception => exception != null && !string.IsNullOrEmpty(exception.Message)).Aggregate("", (current, exception) => current + exception.Message + "\r\n");
throw new Exception(message, e);
}
}
示例2: CreateDirectory
bool CreateDirectory(IActivityIOOperationsEndPoint dst, Dev2CRUDOperationTO args)
{
var result = dst.CreateDirectory(dst.IOPath, args);
return result;
}