protected bool TransferDirectoryContents(IActivityIOOperationsEndPoint src, IActivityIOOperationsEndPoint dst, IDev2CRUDOperationTO args)
{
if (!args.Overwrite)
{
ValidateSourceAndDestinationContents(src, dst, args);
}
if (args.DoRecursiveCopy)
{
RecursiveCopy(src, dst, args);
}
var srcContents = src.ListFilesInDirectory(src.IOPath);
var result = true;
var origDstPath = Dev2ActivityIOPathUtils.ExtractFullDirectoryPath(dst.IOPath.Path);
if (!dst.PathExist(dst.IOPath))
{
CreateDirectory(dst, args);
}
// TODO: cleanup this code so that result is easier to follow
foreach (var p in srcContents)
{
result = PerformTransfer(src, dst, args, origDstPath, p, result);
}
Dev2Logger.Debug($"Transfered: {src.IOPath.Path}", GlobalConstants.WarewolfDebug);
return(result);
}