CopyFilesToFolder() public static method

public static CopyFilesToFolder ( this files, string sourceFolder, string destinationFolder, bool overwrite, Action messageHandler, bool>.Func errorHandler ) : IEnumerable
files this
sourceFolder string
destinationFolder string
overwrite bool
messageHandler Action
errorHandler bool>.Func
return IEnumerable
コード例 #1
0
ファイル: ExtractMetadataWorker.cs プロジェクト: runt18/docfx
        private static void CopyFromCachedResult(BuildInfo buildInfo, IEnumerable <string> inputs, string outputFolder)
        {
            var outputFolderSource = buildInfo.OutputFolder;
            var relativeFiles      = buildInfo.RelatvieOutputFiles;

            if (relativeFiles == null)
            {
                Logger.Log(LogLevel.Warning, $"No metadata is generated for '{TypeForwardedToStringExtension.ToDelimitedString(inputs)}'.");
                return;
            }

            Logger.Log(LogLevel.Info, $"'{TypeForwardedToStringExtension.ToDelimitedString(inputs)}' keep up-to-date since '{buildInfo.TriggeredUtcTime.ToString()}', cached result from '{buildInfo.OutputFolder}' is used.");
            TypeForwardedToPathUtility.CopyFilesToFolder(relativeFiles.Select(s => Path.Combine(outputFolderSource, s)), outputFolderSource, outputFolder, true, s => Logger.Log(LogLevel.Info, s), null);
        }