当前位置: 首页>>代码示例>>C#>>正文


C# FileSystem.Copy方法代码示例

本文整理汇总了C#中FileSystem.Copy方法的典型用法代码示例。如果您正苦于以下问题:C# FileSystem.Copy方法的具体用法?C# FileSystem.Copy怎么用?C# FileSystem.Copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileSystem的用法示例。


在下文中一共展示了FileSystem.Copy方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

        public void SetUp()
        {
            var fileSystem = new FileSystem();

            fileSystem.Copy("FubuMVC.SlickGrid.Docs.csproj.fake", "FubuMVC.SlickGrid.Docs.csproj");
            fileSystem.Copy("SlickGridHarness.csproj.fake", "SlickGridHarness.csproj");
        }
开发者ID:awelburn,项目名称:FubuCsProjFile,代码行数:7,代码来源:AssemblyReferenceTester.cs

示例2: SetUp

        public void SetUp()
        {
            var fileSystem = new FileSystem();
            fileSystem.CreateDirectory("Solution1");
            fileSystem.CleanDirectory("Solution1");

            fileSystem.CreateDirectory(@"Solution1\docs");
            fileSystem.CreateDirectory(@"Solution1\harness");
            fileSystem.Copy("SlickGridHarness.csproj.fake", @"Solution1\harness\SlickGridHarness.csproj");
            fileSystem.Copy("FubuMVC.SlickGrid.Docs.csproj.fake", @"Solution1\docs\FubuMVC.SlickGrid.Docs.csproj");

            theSolutionProject = new SolutionProject("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"FubuMVC.SlickGrid\", \"FubuMVC.SlickGrid\\FubuMVC.SlickGrid.csproj\", \"{A67A0CE1-E4C2-45FC-9019-829D434B2CC4}\"", "Solution1");
        }
开发者ID:awelburn,项目名称:FubuCsProjFile,代码行数:13,代码来源:ProjectReferenceTester.cs

示例3: Main

        public static int Main(string[] args)
        {
            var fileSystem = new FileSystem();

            string srcDirectory = AppDomain.CurrentDomain.BaseDirectory.ParentDirectory().ParentDirectory().ParentDirectory().ParentDirectory();
            string buildDirectory = args.Any()
                                        ? args.Single()
                                        : srcDirectory.ParentDirectory().ParentDirectory().AppendPath("buildsupport");

            Console.WriteLine("Trying to copy to " + buildDirectory);
            if (!fileSystem.DirectoryExists(buildDirectory))
            {
                throw new ApplicationException("Could not find the buildsupport directory");
            }

            var targetDirectory = buildDirectory.AppendPath("FubuDocs");

            fileSystem.CreateDirectory(targetDirectory);
            fileSystem.CleanDirectory(targetDirectory);

            var fromDirectory = srcDirectory.AppendPath("FubuDocsRunner").AppendPath("bin").AppendPath("debug");
            var files = FileSet.Deep("*.dll;*.pdb;*.exe");
            fileSystem.FindFiles(fromDirectory, files).Each(file => {
                Console.WriteLine("Copying {0} to {1}", file, targetDirectory);
                fileSystem.Copy(file, targetDirectory, CopyBehavior.overwrite);
            });

            return 0;
        }
开发者ID:mtscout6,项目名称:FubuWorld,代码行数:29,代码来源:Program.cs

示例4: CreateDataFolder

 public static void CreateDataFolder()
 {
     var fileSystem = new FileSystem();
     fileSystem.CleanDirectory("data");
     fileSystem.DeleteDirectory("data");
     fileSystem.Copy(FileSystem.Combine("..", "..", "data"), "data");
 }
开发者ID:KevM,项目名称:ripple,代码行数:7,代码来源:DataMother.cs

示例5: CopyTest

 public void CopyTest()
 {
     FileSystem target = new FileSystem();
     int sourceFileId = 252;
     int outputDirectoryId = 249;
     int isDirectory = 1;
     string userEmail ="[email protected]";
     string userPass = "pass2";
     target.Copy(sourceFileId, outputDirectoryId, isDirectory, userEmail, userPass);
     Assert.Inconclusive("Невозможно проверить метод, не возвращающий значение.");
 }
开发者ID:tel8618217223380,项目名称:sinchosaur,代码行数:11,代码来源:FileSystemTest.cs

示例6: Generate

        public void Generate(NuspecGenerationReport report)
        {
            var files = new FileSystem();
            var targetFile = report.FindNuspecFile(_template);

            files.Copy(_template.Spec.Filename, targetFile);

            if (report.UpdateDependencies)
            {
                generateNuspec(targetFile);
            }
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:12,代码来源:NuspecPlan.cs

示例7: SetUp

        public void SetUp()
        {
            fileSystem = new FileSystem();

            fileSystem.Copy("FubuMVC.SlickGrid.Docs.csproj.fake", "FubuMVC.SlickGrid.Docs.csproj");
            fileSystem.Copy("SlickGridHarness.csproj.fake", "SlickGridHarness.csproj");

            fileSystem.DeleteDirectory("myproj");
            fileSystem.CreateDirectory("myproj");
        }
开发者ID:nosami,项目名称:FubuCsProjFile,代码行数:10,代码来源:CsProjFileTester.cs


注:本文中的FileSystem.Copy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。