Path manipulation projects

We have added two interesting projects to SymbolSource that make path manipulation much easier than when using System.IO.Path and allow some additional scenarios. This is how they are described by their authors:

FileDirectoryPath

NDepend.Helpers.FilePathDirectory is the library used by the tool NDepend to handle common path operations. Benefits of the NDepend.Helpers.FilePathDirectory over the .NET Framework class System.IO.Path include:

  • Strongly typed File/Directory path.
  • Relative / absolute path conversion.
  • Path normalization API
  • Path validity check API
  • Path comparison API
  • Path browsing API.
  • Path rebasing API

Read more at http://filedirectorypath.codeplex.com.

FluentPath

Since .NET v1, lots of good things happened to C#: lambda expressions, extension methods, optional parameters to name just a few. Outside of .NET, other interesting things happened as well. For example, you might have heard about this JavaScript library that had some success introducing a fluent API to handle the hierarchical structure of the HTML DOM. You know? jQuery.

Knowing all that, every time I need to use the stuff in System.IO, I cringe. So I thought I’d just build a more modern wrapper around it. I used a fluent API based on an essentially immutable Path type and an enumeration of such path objects. To achieve the fluent style, a healthy dose of lambda expressions is being used to act on the objects.

Read more at http://fluentpath.codeplex.com.

Posted by Marcin Mikołajczak (TripleEmcoder) on Monday, June 28, 2010

blog comments powered by Disqus