本文整理汇总了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");
}
示例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");
}
示例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;
}
示例4: CreateDataFolder
public static void CreateDataFolder()
{
var fileSystem = new FileSystem();
fileSystem.CleanDirectory("data");
fileSystem.DeleteDirectory("data");
fileSystem.Copy(FileSystem.Combine("..", "..", "data"), "data");
}
示例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("Невозможно проверить метод, не возвращающий значение.");
}
示例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);
}
}
示例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");
}