本文整理汇总了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");
}
示例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"
});
}
示例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"
});
}
示例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);
}
示例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();
}
示例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");
}
示例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"));
}
示例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"));
}
示例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");
}
示例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"));
}
示例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"));
}
示例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();
}
示例13: SetUp
public void SetUp()
{
var fileSystem = new FileSystem();
fileSystem.DeleteDirectory("myfoo");
fileSystem.CreateDirectory("myfoo");
}
示例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");
}
示例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");
}