Open
Description
Per @jasonwilliams200OK in dotnet/coreclr#390
Based on this answer: http://stackoverflow.com/a/81493/1712065 (further redirected from: http://stackoverflow.com/a/326153).
Please add the ability to retrieve path with actual case via FileInfo
and DirectoryInfo
classes. The candidate member being FullPath
and Name
. Perhaps there is some sophisticated way of getting it from win32 file system API, but that seems to be a working solution.
Expected:
using System.IO.FileInfo;
// ..
// actual path was:
// C:\\SharePoint\\scripts\\MasterDeployment.ps1
FileInfo info = new FileInfo("c:\\sharepoint\\scriPts\\maSTerdeploymnet.PS1");
Console.WriteLine(info.FullPath);
// C:\\SharePoint\\scripts\\MasterDeployment.ps1
Console.WriteLine(info.Name);
// MasterDeployment.ps1
Actual result:
using System.IO.FileInfo;
// ..
// actual path was:
// C:\\SharePoint\\scripts\\MasterDeployment.ps1
FileInfo info = new FileInfo("c:\\sharepoint\\scriPts\\maSTerdeploymnet.PS1");
Console.WriteLine(info.FullPath);
// c:\\sharepoint\\scriPts\\maSTerdeploymnet.PS1
Console.WriteLine(info.Name);
// maSTerdeploymnet.PS1