I\'m needing to parse a path into parts from within a portable class library and get things like the filename, extension, just directory name, etc.
All of these met
You may be able to use or adapt the code for System.IO.Path from Mono: https://github.com/mono/mono/blob/master/mcs/class/corlib/System.IO/Path.cs
EDIT: Also, my PCL Storage library provides some file IO APIs to PCLs, including PortablePath.Combine()
.
I would use Uri
class
var segments = new Uri("file://c:/dir1/dir2/a.txt").Segments
which is supported by PCL
http://msdn.microsoft.com/en-us/library/system.uri.aspx