Friday, December 16, 2011

Parsing file paths

Since I can't seem to remember these functions that work on a full path with filename:

System.IO.Path.GetFileName - extracts the filename part with extensions and loses the leading path
System.IO.Path.GetDirectoryName - extracts the leading path and loses the filename with extension
System.IO.Path.GetExtension - extracts just the extension from the path

No comments:

Post a Comment