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


C# FileSystem.DeleteDirectory方法代码示例

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


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

示例1: 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

示例2: SetUp

        public void SetUp()
        {
            system = new FileSystem();
            system.DeleteDirectory(AppDirectory);
            system.DeleteDirectory(PackageDirectory);

            writeFiles();

            thePipeline = new AssetPipeline();
            theBuilder = new AssetPipelineBuilder(new FileSystem(), thePipeline, new PackageLog());
            theBuilder.LoadFiles(new PackageAssetDirectory(){
                Directory = AppDirectory,
                PackageName = AssetPipeline.Application
            });

            theBuilder.LoadFiles(new PackageAssetDirectory(){
                Directory = PackageDirectory,
                PackageName = "pak1"
            });
        }
开发者ID:jemacom,项目名称:fubumvc,代码行数:20,代码来源:AssetPipelineBuilderIntegratedTester.cs

示例3: SetUp

        public void SetUp()
        {
            system = new FileSystem();
            system.DeleteDirectory(AppDirectory);
            system.DeleteDirectory(PackageDirectory);

            writeFiles();


            _theFileGraph = new AssetFileGraph();
            theBuilder = new AssetFileGraphBuilder(new FileSystem(), _theFileGraph, new PackageLog());
            theBuilder.LoadFiles(new PackageAssetDirectory(){
                Directory = AppDirectory,
                PackageName = AssetFileGraph.Application
            });

            theBuilder.LoadFiles(new PackageAssetDirectory(){
                Directory = PackageDirectory,
                PackageName = "pak1"
            });
        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:21,代码来源:AssetFileGraphBuilderIntegratedTester.cs

示例4: BeforeEach

        public void BeforeEach()
        {
            var fs = new FileSystem();
            fs.DeleteDirectory(thePathToScan);
            fs.CreateDirectory(thePathToScan);
            fs.CreateDirectory(thePathToScan, "bin");

            theLoader = new SolutionDirectoryPackageLoader(thePathToScan.ToFullPath());
            var manifest = new PackageManifest();
            manifest.Name = "test-mani";

            fs.PersistToFile(manifest, thePathToScan, PackageManifest.FILE);
        }
开发者ID:cprieto,项目名称:fubumvc,代码行数:13,代码来源:SolutionDirectoryPackageLoaderTester.cs

示例5: do_not_use_bin_for_private_bin_path_if_it_does_not_exist

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

            fileSystem.DeleteDirectory("Service2");

            fileSystem.CreateDirectory("Service2");

            var expression = new RemoteDomainExpression();
            expression.Setup.PrivateBinPath.ShouldBeNull();

            expression.ServiceDirectory = "Service2";

            expression.Setup.PrivateBinPath.ShouldBeNull();
        }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:15,代码来源:RemoteDomainExpressionTester.cs

示例6: will_use_bin_for_private_bin_path_if_it_exists

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

            fileSystem.DeleteDirectory("Service");

            fileSystem.CreateDirectory("Service");
            fileSystem.CreateDirectory("Service", "bin");

            var expression = new RemoteDomainExpression();
            expression.Setup.PrivateBinPath.ShouldBeNull();

            expression.ServiceDirectory = "Service";

            expression.Setup.PrivateBinPath.ShouldEqual("bin");
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:16,代码来源:RemoteDomainExpressionTester.cs

示例7: will_use_bin_debug_for_private_bin_path_if_it_exists_and_release_does_not

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

            fileSystem.DeleteDirectory(serviceDirectory);

            fileSystem.CreateDirectory(serviceDirectory);
            fileSystem.CreateDirectory(serviceDirectory, "bin");
            fileSystem.CreateDirectory(serviceDirectory, "bin", "Debug");

            var expression = new RemoteDomainExpression();
            expression.Setup.PrivateBinPath.ShouldBeNull();

            expression.ServiceDirectory = serviceDirectory;

            expression.Setup.PrivateBinPath.ShouldBe("bin".AppendPath("Debug"));
        }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:17,代码来源:RemoteDomainExpressionTester.cs

示例8: will_use_bin_release_for_private_bin_path_if_it_exists_and_release_has_precedence

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

            fileSystem.DeleteDirectory("Service");

            fileSystem.CreateDirectory("Service");
            fileSystem.CreateDirectory("Service", "bin");
            fileSystem.CreateDirectory("Service", "bin", "Release");
            fileSystem.CreateDirectory("Service", "bin", "Debug");

            var expression = new RemoteDomainExpression();
            expression.Setup.PrivateBinPath.ShouldBeNull();

            expression.ServiceDirectory = "Service";

            expression.Setup.PrivateBinPath.ShouldEqual("bin".AppendPath("Release"));
        }
开发者ID:DarthFubuMVC,项目名称:bottles,代码行数:18,代码来源:RemoteDomainExpressionTester.cs

示例9: SetUp

        public void SetUp()
        {
            var system = new FileSystem();
            system.DeleteDirectory("package1");

            system.CreateDirectory("package1");
            system.CreateDirectory("package1", "bin");
            system.CreateDirectory("package1", "WebContent");
            system.CreateDirectory("package1", "Data");

            theOriginalManifest = new PackageManifest(){
                Assemblies = new string[]{"a", "b", "c"},
                Name = "Extraordinary"
            };

            theOriginalManifest.AddDependency("bottle1", true);
            theOriginalManifest.AddDependency("bottle2", true);
            theOriginalManifest.AddDependency("bottle3", false);

            theOriginalManifest.WriteTo("package1");

            thePackage = new PackageManifestReader(new FileSystem(), directory => directory.AppendPath("WebContent")).LoadFromFolder("package1");
        }
开发者ID:wbinford,项目名称:bottles,代码行数:23,代码来源:BottleManifestReaderTester.cs

示例10: writes_both_the_update_and_rollback_files

        public void writes_both_the_update_and_rollback_files()
        {
            StoreOptions(_ =>
            {
                // This is enough to tell Marten that the User
                // document is persisted and needs schema objects
                _.Schema.For<User>();

                // Lets Marten know that the event store is active
                _.Events.AddEventType(typeof(MembersJoined));
            });

            var fileSystem = new FileSystem();
            fileSystem.DeleteDirectory(@"bin\patches");
            fileSystem.CreateDirectory(@"bin\patches");

            // SAMPLE: write-patch
            // Write the patch SQL file to the @"bin\patches" directory
            theStore.Schema.WritePatch(@"bin\patches".AppendPath("1.initial.sql"));
            // ENDSAMPLE

            fileSystem.FileExists(@"bin\patches".AppendPath("1.initial.sql"));
            fileSystem.FileExists(@"bin\patches".AppendPath("1.initial.drop.sql"));
        }
开发者ID:danielmarbach,项目名称:marten,代码行数:24,代码来源:WritePatch_smoke_tests.cs

示例11: SetUp

        public void SetUp()
        {
            var fileSystem = new FileSystem();
            fileSystem.DeleteDirectory("hoth");
            fileSystem.CreateDirectory("hoth");

            new InitializeCommand().Execute(new InitializeInput()
            {
                DeploymentFlag = "hoth".AppendPath("deployment"),
                ForceFlag = true
            });

            fileSystem.DeleteDirectory("tatooine");
            fileSystem.CreateDirectory("tatooine");
            new InitializeCommand().Execute(new InitializeInput()
            {
                DeploymentFlag = "tatooine".AppendPath("deployment"),
                ForceFlag = true
            });

            theSettings = new DeploymentSettings("hoth".AppendPath("deployment"));
            theSettings.AddImportedFolder("tatooine".AppendPath("deployment"));
        }
开发者ID:emiaj,项目名称:bottles,代码行数:23,代码来源:DeploymentSettingsTester.cs

示例12: SetUp

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

            theFileSystem.DeleteDirectory("fake-app");
            theFileSystem.CreateDirectory("fake-app");

            theFileSystem.FindFiles(".".ToFullPath(), ApplicationSettings.FileSearch())
                .Each(x => theFileSystem.DeleteFile(x));

            theOriginalSettings = ApplicationSettings.For<KayakApplication>();
            theOriginalSettings.ParentFolder = "fake-app".ToFullPath();
            theOriginalSettings.Write();

            aSpecificLocation = theOriginalSettings.GetFileName();
        }
开发者ID:wbinford,项目名称:fubu,代码行数:16,代码来源:KayakCommandTester.cs

示例13: SetUp

 public void SetUp()
 {
     var fileSystem = new FileSystem();
     fileSystem.DeleteDirectory("myfoo");
     fileSystem.CreateDirectory("myfoo");
 }
开发者ID:haseeb1431,项目名称:FubuCsProjFile,代码行数:6,代码来源:MSBuildProjectTester.cs

示例14: SetUp

        public void SetUp()
        {
            var system = new FileSystem();
            system.DeleteDirectory("localization1");
            system.DeleteDirectory("localization2");
            system.DeleteDirectory("localization3");

            system.CreateDirectory("localization1");
            system.CreateDirectory("localization2");
            system.CreateDirectory("localization3");
        }
开发者ID:henninga,项目名称:fubulocalization,代码行数:11,代码来源:LocalizationProviderFactoryIntegratedTester.cs

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