Is there a way to easily parse file paths in portable class libraries?

后端 未结 2 801
南笙
南笙 2021-01-17 12:15

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

2条回答
  •  耶瑟儿~
    2021-01-17 12:19

    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().

提交回复
热议问题