Пример #1
0
        int copy(string path_s, string path_t)
        {
            List <DirectoryInfo> dics = IOExtension.GetAllDirectorys(IOExtension.MakeDir(path_s));

            dics.ForEach((inx, dic) =>
            {
                IOExtension.MakeDir(true, dic.FullName.Replace(path_s, path_t));
            });
            _setlog($"创建完成{dics.Count}个文件夹");
            List <FileInfo> allfile = IOExtension.GetAllFiles(IOExtension.MakeDir(path_s));

            return(ShellFileOperation.Copy(
                       allfile.Select(a => a.FullName),
                       allfile.Select(a => a.FullName.Replace(path_s, path_t))
                       ));
        }