public override async Task <TemplatesContentInfo> GetContentAsync(TemplatesPackageInfo packageInfo, string workingFolder, CancellationToken ct) { var extractionFolder = await ExtractAsync(packageInfo, true, ct); var finalDestination = Path.Combine(workingFolder, packageInfo.Version.ToString()); await Fs.SafeMoveDirectoryAsync(Path.Combine(extractionFolder, "Templates"), finalDestination, true, ReportCopyProgress); Fs.SafeDeleteDirectory(Path.GetDirectoryName(packageInfo.LocalPath)); var templatesInfo = new TemplatesContentInfo() { Date = packageInfo.Date, Path = finalDestination, Version = packageInfo.Version }; return(templatesInfo); }
public override TemplatesContentInfo GetContent(TemplatesPackageInfo packageInfo, string workingFolder) { var extractionFolder = Extract(packageInfo); var finalDestination = Path.Combine(workingFolder, packageInfo.Version.ToString()); Fs.SafeMoveDirectory(Path.Combine(extractionFolder, "Templates"), finalDestination, true); var templatesInfo = new TemplatesContentInfo() { Date = packageInfo.Date, Path = finalDestination, Version = packageInfo.Version }; Fs.SafeDeleteDirectory(Path.GetDirectoryName(packageInfo.LocalPath)); return(templatesInfo); }