本文整理汇总了C#中System.IO.FileSystem.GetFullPath方法的典型用法代码示例。如果您正苦于以下问题:C# FileSystem.GetFullPath方法的具体用法?C# FileSystem.GetFullPath怎么用?C# FileSystem.GetFullPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.FileSystem
的用法示例。
在下文中一共展示了FileSystem.GetFullPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: before_all
public void before_all()
{
// setup
_command = new NewCommand();
_fileSystem = new FileSystem();
_zipService = new ZipFileService(_fileSystem);
_commandInput = new NewCommandInput();
tmpDir = FileSystem.Combine("Templating", Guid.NewGuid().ToString());
repoZip = FileSystem.Combine("Templating", "repo.zip");
_zipService.ExtractTo(repoZip, tmpDir, ExplodeOptions.DeleteDestination);
solutionFile = FileSystem.Combine("Templating", "sample", "myproject.txt");
oldContents = _fileSystem.ReadStringFromFile(solutionFile);
solutionDir = _fileSystem.GetDirectory(solutionFile);
_commandInput.GitFlag = "file:///{0}".ToFormat(_fileSystem.GetFullPath(tmpDir).Replace("\\", "/"));
_commandInput.ProjectName = "MyProject";
_commandInput.SolutionFlag = solutionFile;
_commandInput.OutputFlag = solutionDir;
_commandInput.RakeFlag = "init.rb";
_commandResult = _command.Execute(_commandInput);
newSolutionContents = _fileSystem.ReadStringFromFile(solutionFile);
}
示例2: telling_solution_not_to_save_projects_should_not_save_projects
public void telling_solution_not_to_save_projects_should_not_save_projects()
{
var fileSystem = new FileSystem();
var fullPathToHarnessProject = fileSystem.GetFullPath(@"SlickGridHarness\SlickGridHarness.csproj");
var originalWriteTimestamp = new FileInfo(fullPathToHarnessProject).LastWriteTime;
var solution = Solution.LoadFrom("FubuMVC.SlickGrid.sln");
solution.Save(saveProjects: false);
new FileInfo(fullPathToHarnessProject).LastWriteTime.ShouldEqual(originalWriteTimestamp);
}
示例3: FilePokeTask
public FilePokeTask(string filePath, IList<FilePokeReplacement> replacements, FileSystem.Path path)
: base(path)
{
_filePath = path.GetFullPath(filePath);
_replacements = replacements;
}