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


C# FileSystem.CreateDirectory方法代码示例

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


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

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

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

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

示例4: CreateChildDirectory

 public IDirectory CreateChildDirectory(string name)
 {
     var newPath = System.IO.Path.Combine(Path, name);
     var fileSystem = new FileSystem();
     fileSystem.CreateDirectory(newPath);
     return fileSystem.GetDirectory(newPath);
 }
开发者ID:tpeplow,项目名称:Projector,代码行数:7,代码来源:FileSystem.cs

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

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

示例7: SetUp

        public void SetUp()
        {
            theFileSystem = new FileSystem();
            theSolutionDir = Guid.NewGuid().ToString().ToFullPath();

            theFileSystem.CreateDirectory(theSolutionDir);
            theFileSystem.CreateDirectory(theSolutionDir, "src");

            createProject("ProjectA");
            createProject("ProjectB");
            createProject("ProjectC");

            RippleFileSystem.StopTraversingAt(theSolutionDir.ParentDirectory());
            RippleFileSystem.StubCurrentDirectory(theSolutionDir);

            new InitCommand().Execute(new InitInput { Name = "Test" });
        }
开发者ID:4lexm,项目名称:ripple,代码行数:17,代码来源:IntegratedInitCommandTester.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: DownloadTo

		public INugetFile DownloadTo(Solution solution, string directory)
		{
			var files = new FileSystem();
			files.CreateDirectory(directory);

			var fileName = "{0}.{1}.nupkg".ToFormat(Name, Version);
			files.WriteStringToFile(fileName, "");

			return new StubNugetFile(new Dependency(Name, Version.ToString())) { FileName = fileName};
		}
开发者ID:modulexcite,项目名称:ripple,代码行数:10,代码来源:StubNuget.cs

示例10: explode_smoke_test

        public void explode_smoke_test()
        {
            var file = new NugetFile("Bottles.1.0.0.441.nupkg", SolutionMode.Ripple);
            var system = new FileSystem();
            system.CreateDirectory("bottles");
            system.CleanDirectory("bottles");

            var package = file.ExplodeTo("bottles");

            package.ShouldNotBeNull();
            package.AssemblyReferences.Single().Name.ShouldEqual("Bottles.dll");
        }
开发者ID:bobpace,项目名称:ripple,代码行数:12,代码来源:NugetFileTester.cs

示例11: CreateDirectoryTest

        public void CreateDirectoryTest()
        {
            FileSystem target = new FileSystem();
            string path = "\\folder1";
            string userEmail = "[email protected]";
            string userPass = "pass2";
            target.CreateDirectory(path, userEmail, userPass);

            path = "\\folder1\\folder1_1\\folder1_1_1";
            userEmail = "[email protected]";
            userPass = "pass2";
            target.CreateDirectory(path, userEmail, userPass);
        }
开发者ID:tel8618217223380,项目名称:sinchosaur,代码行数:13,代码来源:FileSystemTest.cs

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

示例13: ExplodeTo

	    public IPackage ExplodeTo(string directory)
		{
			var explodedDirectory = directory.AppendPath(Name).ToFullPath();
			RippleLog.Info("Exploding to " + explodedDirectory);

			var fileSystem = new FileSystem();
			fileSystem.CreateDirectory(explodedDirectory);
			fileSystem.CleanDirectory(explodedDirectory);

			fileSystem.DeleteFile(FileName);

			fileSystem.WriteStringToFile(explodedDirectory.AppendPath(FileName), "");
			
			return new StubPackage(Name, Version.ToString());
		}
开发者ID:modulexcite,项目名称:ripple,代码行数:15,代码来源:StubNugetFile.cs

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

示例15: FixtureSetUp

        public void FixtureSetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("FubuCore", fubucore => fubucore.Publishes("FubuCore"));
            });

            theNugetDirectory = theScenario.Directory.AppendPath("nugets");

            theFileSystem = new FileSystem();
            theFileSystem.CreateDirectory(theNugetDirectory);

            theSolution = theScenario.Find("FubuCore");

            theSolution.Package(new PackageParams(theSolution.Specifications.Single(), new SemanticVersion("1.1.1.1"), theNugetDirectory, _publishSymbols));
        }
开发者ID:modulexcite,项目名称:ripple,代码行数:16,代码来源:IntegratedPackagingTester.cs


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