Browse - Programming Tips - dotnet: on-disk case of filename or folder

Date: 2019jun26
Language: C#
Platform: .net, dotnet
Keywords: capitalization

Q.  dotnet: on-disk case of filename or folder

A.  FileInfo.FullPath does it.

System.IO.FileInfo fi = new System.IO.FileInfo("c:/winDOWS"); string normal = fi.FullPath; Console.WriteLine(normal);
This also works in managed C++. In Java its File.getCanonicalName()