Is there anything built into System.IO.Path
that gives me just the filepath?
For example, if I have a string
@"c:\webserver\public\myCompany\configs\promo.xml",
is there any BCL method that will give me
"c:\webserver\public\myCompany\configs\"?
promo.xml
designates a file or a directory by that same name. Which is probably whyPath.GetDirectoryName()
is implemented so simple and just truncates the last segment, or removes the trailing slash if there is one. – Kirwan