.NET path manipulation library

后端 未结 5 1594
感情败类
感情败类 2021-01-06 05:49

Does anyone know of any good library that abstracts the problem of path manipulation in a nice way? I\'d like to be able to combine and parse paths with arbitrary separators

5条回答
  •  借酒劲吻你
    2021-01-06 06:29

    I'm afraid you'll have to implement a path class yourself, as I did. It gives the following advantages:

    • you can profit from type safety
    • you can override operator/, which makes concatenation easier
    • you can add convenience member functions such as GetParentPath() and GetLeafPart()

提交回复
热议问题