<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>NDepend.Helpers.FileDirectoryPath</title><link>http://www.codeplex.com/FileDirectoryPath/Project/ProjectRss.aspx</link><description>NDepend.Helpers.FilePathDirectory is a library that handles common path operations such as absolute&amp;#47;relative conversion, validity, rebasing, normalization, browsing...   </description><item><title>CREATED ISSUE: NDepend.Helpers.FileDirectoryPath.DLL is unsigned</title><link>http://www.codeplex.com/FileDirectoryPath/WorkItem/View.aspx?WorkItemId=4409</link><description>The NDepend.Helpers.FileDirectoryPath project is not a signed assembly, and therefore signed projects cannot use it. Please add just a basic strong-name key to it w&amp;#47; no password.&lt;br /&gt;</description><author>EvanL</author><pubDate>Thu, 17 Apr 2008 20:29:36 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: NDepend.Helpers.FileDirectoryPath.DLL is unsigned 20080417082936P</guid></item><item><title>CREATED ISSUE: DirectoryPathAbsolute.IsChildDirectory does not work if directory has spaces</title><link>http://www.codeplex.com/FileDirectoryPath/WorkItem/View.aspx?WorkItemId=2514</link><description>consider the following test&lt;br /&gt;   &amp;#91;Test&amp;#93;&lt;br /&gt;        public void PathWithSpace&amp;#40;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            DirectoryPathAbsolute d1 &amp;#61; new DirectoryPathAbsolute&amp;#40;&amp;#34;d&amp;#58;&amp;#47;path with space&amp;#47;file.ext&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;            DirectoryPathAbsolute d2 &amp;#61; new DirectoryPathAbsolute&amp;#40;&amp;#64;&amp;#34;d&amp;#58;&amp;#92;path&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;            Assert.IsFalse&amp;#40;d1.IsChildDirectoryOf&amp;#40;d2&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;this will fail. It should return false, but it returns true.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You could fix the function as follows&amp;#58;&lt;br /&gt;public bool IsChildDirectoryOf&amp;#40;DirectoryPathAbsolute parentDir&amp;#41; &amp;#123;&lt;br /&gt;         if &amp;#40;parentDir &amp;#61;&amp;#61; null&amp;#41; &amp;#123; throw new ArgumentNullException&amp;#40;&amp;#34;parentDir&amp;#34;&amp;#41;&amp;#59; &amp;#125;&lt;br /&gt;         if &amp;#40;parentDir.IsEmpty&amp;#41; &amp;#123; throw new ArgumentException&amp;#40;&amp;#34;Empty parentDir not accepted&amp;#34;, &amp;#34;parentDir&amp;#34;&amp;#41;&amp;#59; &amp;#125;&lt;br /&gt;         string parentPathUpperCase &amp;#61; parentDir.Path.ToUpper&amp;#40;&amp;#41;&amp;#43;&amp;#64;&amp;#34;&amp;#92;&amp;#34;&amp;#59;  &amp;#60;----- fix here&lt;br /&gt;         string thisPathUpperCase &amp;#61; this.Path.ToUpper&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;         return thisPathUpperCase.Contains&amp;#40;parentPathUpperCase&amp;#41;&amp;#59;&lt;br /&gt;      &amp;#125;&lt;br /&gt;</description><author>onnovl</author><pubDate>Wed, 28 Nov 2007 22:26:34 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: DirectoryPathAbsolute.IsChildDirectory does not work if directory has spaces 20071128102634P</guid></item><item><title>NEW POST: File names as relative paths</title><link>http://www.codeplex.com/FileDirectoryPath/Thread/View.aspx?ThreadId=17262</link><description>&lt;div class="wikidoc"&gt;
 &lt;br /&gt;When I create a FilePathRelativeFile, it throws an ArgumentException if the path does not start with a dot. This prevents me from using just a filename as a relative path. &lt;br /&gt; &lt;br /&gt;For example, the following will fail on the first line:&lt;br /&gt; &lt;br /&gt;      filePathRelative1 = new FilePathRelative(@&amp;quot;File.txt&amp;quot;);&lt;br /&gt;      directoryPathAbsolute1 = new DirectoryPathAbsolute(&amp;quot;C:\temp&amp;quot;);&lt;br /&gt;      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);&lt;br /&gt;      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\temp\File.txt&amp;quot;);&lt;br /&gt; &lt;br /&gt;Is this an issue, or am I missing something?&lt;br /&gt;
&lt;/div&gt;</description><author>csharpuser4815162</author><pubDate>Thu, 01 Nov 2007 20:44:28 GMT</pubDate><guid isPermaLink="false">NEW POST: File names as relative paths 20071101084428P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=9</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class &lt;a href="http://msdn2.microsoft.com/en-us/library/system.io.path.aspx" class="externalLink"&gt;System.IO.Path&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt; &lt;br /&gt;Here is the class diagram:&lt;br /&gt;&lt;img src="http://www.codeplex.com/FileDirectoryPath/Project/Download/FileDownload.aspx?DownloadId=20424" alt="PathClassDiagram.PNG" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here is some code that shows common &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; use cases:&lt;br /&gt;&lt;pre&gt;
using NDepend.Helpers.FileDirectoryPath;
using System.Diagnostics;
using System.Collections.Generic;
 
class Program {
   static void Main(string[] args) {
      FilePathAbsolute filePathAbsolute1, filePathAbsolute2;
      FilePathRelative filePathRelative1;
      DirectoryPathAbsolute directoryPathAbsolute1;
      DirectoryPathRelative directoryPathRelative1;
 
 
      //
      //  Path normalization
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.Path == @&amp;quot;C:\Dir1\File.txt&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:/Dir1\\Dir2\&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\..\Dir2\.&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir2&amp;quot;);
 
 
      //
      // Path comparison
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      filePathAbsolute2 = new FilePathAbsolute(@&amp;quot;C:\DIR1\FILE.TXT&amp;quot;);
      Debug.Assert(filePathAbsolute1.Equals(filePathAbsolute2));
      Debug.Assert(filePathAbsolute1 == filePathAbsolute2);
 
 
      //
      // Relative -&amp;gt; Absolute path conversion
      //
      filePathRelative1 = new FilePathRelative(@&amp;quot;..\..\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);
      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\Dir2\Dir1\File.txt&amp;quot;);
 
 
      //
      // Absolute -&amp;gt; Relative path conversion
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathRelative1 = filePathAbsolute1.GetPathRelativeFrom(directoryPathAbsolute1);
      Debug.Assert(filePathRelative1.Path == @&amp;quot;..\..\..\Dir1\File.txt&amp;quot;);
 
 
      //
      // Path string validation
      //
      string reason;
      Debug.Assert(PathHelper.IsValidAbsolutePath(@&amp;quot;C:\Dir2\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;C:\..\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;.\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;1:\Dir1&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;..\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;C:\Dir1\Dir2&amp;quot;, out reason));
 
 
      //
      // File name &amp;amp; extension
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileName == &amp;quot;File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileNameWithoutExtension == &amp;quot;File.cs&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileExtension == &amp;quot;.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.HasExtension(&amp;quot;.txt&amp;quot;));
 
 
      //
      // Path browsing
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.Path == @&amp;quot;C:\Dir1&amp;quot;);
      Debug.Assert(filePathAbsolute1.GetBrotherFileWithName(&amp;quot;File.xml&amp;quot;).Path == @&amp;quot;C:\Dir1\File.xml&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;Dir2&amp;quot;).Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;..&amp;quot;).Path == @&amp;quot;C:&amp;quot;);
 
      directoryPathRelative1 = new DirectoryPathRelative(@&amp;quot;..\Dir1\Dir2&amp;quot;);
      Debug.Assert(directoryPathRelative1.ParentDirectoryPath.Path == @&amp;quot;..\Dir1&amp;quot;);
 
 
      //
      // Path rebasing
      //
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2\Dir3&amp;quot;);
      DirectoryPathAbsolute directoryPathAbsolute2 = new DirectoryPathAbsolute(@&amp;quot;E:\Dir4\Dir1&amp;quot;);
      DirectoryPathAbsolute rebasedPath;
      PathHelper.TryRebasePath(directoryPathAbsolute1, directoryPathAbsolute2, out rebasedPath);
      Debug.Assert(rebasedPath.Path == @&amp;quot;E:\Dir4\Dir1\Dir2\Dir3&amp;quot;);
 
 
      //
      // List of path  ListOfPathsEquals \ Contains \ TryGetCommonRootDirectory 
      //
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list1 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list2 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir2&amp;quot;));
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir3\Dir4&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir3\dir4&amp;quot;));
      Debug.Assert(ListOfPathHelper.ListOfPathsEquals(list1, list2));
      Debug.Assert(ListOfPathHelper.Contains(list1, new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\dir2&amp;quot;)));
      ListOfPathHelper.TryGetCommonRootDirectory(list1, out directoryPathAbsolute1);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1&amp;quot;);
 
      //
      // List of path   GetListOfUniqueDirsAndUniqueFileNames
      //
      List&amp;lt;FilePathAbsolute&amp;gt; list = new List&amp;lt;FilePathAbsolute&amp;gt;();
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\File1.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\dir1\dir2\File2.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\Dir3\file2.txt&amp;quot;));
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listOfUniqueDirs;
      List&amp;lt;string&amp;gt; listOfUniqueFileNames;
      ListOfPathHelper.GetListOfUniqueDirsAndUniqueFileNames(list, out listOfUniqueDirs, out listOfUniqueFileNames);
      Debug.Assert(listOfUniqueDirs.Count == 2);
      Debug.Assert(listOfUniqueDirs[0].Path == @&amp;quot;E:\Dir1\Dir2&amp;quot;);
      Debug.Assert(listOfUniqueDirs[1].Path == @&amp;quot;E:\Dir1\Dir2\Dir3&amp;quot;);
      Debug.Assert(listOfUniqueFileNames.Count == 2);
      Debug.Assert(listOfUniqueFileNames[0] == &amp;quot;File1.txt&amp;quot;);
      Debug.Assert(listOfUniqueFileNames[1] == &amp;quot;File2.txt&amp;quot;);
 
 
      //
      // Interaction with System.IO API
      //
      filePathAbsolute1 = new FilePathAbsolute(
         System.Reflection.Assembly.GetExecutingAssembly().Location);
      Debug.Assert(filePathAbsolute1.Exists);
      System.IO.FileInfo fileInfo = filePathAbsolute1.FileInfo;
 
      directoryPathAbsolute1 = filePathAbsolute1.ParentDirectoryPath as DirectoryPathAbsolute;
      Debug.Assert(directoryPathAbsolute1.Exists);
      System.IO.DirectoryInfo directoryInfo = directoryPathAbsolute1.DirectoryInfo;
 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listSubDir = directoryPathAbsolute1.ChildrenDirectoriesPath;
      List&amp;lt;FilePathAbsolute&amp;gt; listSubFile = directoryPathAbsolute1.ChildrenFilesPath;
 
   }
}
 
&lt;/pre&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 16:31:34 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018043134P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=8</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class &lt;a href="http://msdn2.microsoft.com/en-us/library/system.io.path.aspx" class="externalLink"&gt;System.IO.Path&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt; &lt;br /&gt;Here is the diagram of classes:&lt;br /&gt;&lt;img src="http://www.codeplex.com/FileDirectoryPath/Project/Download/FileDownload.aspx?DownloadId=20424" alt="PathClassDiagram.PNG" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here is some code that shows common &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; use cases:&lt;br /&gt;&lt;pre&gt;
using NDepend.Helpers.FileDirectoryPath;
using System.Diagnostics;
using System.Collections.Generic;
 
class Program {
   static void Main(string[] args) {
      FilePathAbsolute filePathAbsolute1, filePathAbsolute2;
      FilePathRelative filePathRelative1;
      DirectoryPathAbsolute directoryPathAbsolute1;
      DirectoryPathRelative directoryPathRelative1;
 
 
      //
      //  Path normalization
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.Path == @&amp;quot;C:\Dir1\File.txt&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:/Dir1\\Dir2\&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\..\Dir2\.&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir2&amp;quot;);
 
 
      //
      // Path comparison
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      filePathAbsolute2 = new FilePathAbsolute(@&amp;quot;C:\DIR1\FILE.TXT&amp;quot;);
      Debug.Assert(filePathAbsolute1.Equals(filePathAbsolute2));
      Debug.Assert(filePathAbsolute1 == filePathAbsolute2);
 
 
      //
      // Relative -&amp;gt; Absolute path conversion
      //
      filePathRelative1 = new FilePathRelative(@&amp;quot;..\..\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);
      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\Dir2\Dir1\File.txt&amp;quot;);
 
 
      //
      // Absolute -&amp;gt; Relative path conversion
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathRelative1 = filePathAbsolute1.GetPathRelativeFrom(directoryPathAbsolute1);
      Debug.Assert(filePathRelative1.Path == @&amp;quot;..\..\..\Dir1\File.txt&amp;quot;);
 
 
      //
      // Path string validation
      //
      string reason;
      Debug.Assert(PathHelper.IsValidAbsolutePath(@&amp;quot;C:\Dir2\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;C:\..\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;.\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;1:\Dir1&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;..\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;C:\Dir1\Dir2&amp;quot;, out reason));
 
 
      //
      // File name &amp;amp; extension
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileName == &amp;quot;File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileNameWithoutExtension == &amp;quot;File.cs&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileExtension == &amp;quot;.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.HasExtension(&amp;quot;.txt&amp;quot;));
 
 
      //
      // Path browsing
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.Path == @&amp;quot;C:\Dir1&amp;quot;);
      Debug.Assert(filePathAbsolute1.GetBrotherFileWithName(&amp;quot;File.xml&amp;quot;).Path == @&amp;quot;C:\Dir1\File.xml&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;Dir2&amp;quot;).Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;..&amp;quot;).Path == @&amp;quot;C:&amp;quot;);
 
      directoryPathRelative1 = new DirectoryPathRelative(@&amp;quot;..\Dir1\Dir2&amp;quot;);
      Debug.Assert(directoryPathRelative1.ParentDirectoryPath.Path == @&amp;quot;..\Dir1&amp;quot;);
 
 
      //
      // Path rebasing
      //
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2\Dir3&amp;quot;);
      DirectoryPathAbsolute directoryPathAbsolute2 = new DirectoryPathAbsolute(@&amp;quot;E:\Dir4\Dir1&amp;quot;);
      DirectoryPathAbsolute rebasedPath;
      PathHelper.TryRebasePath(directoryPathAbsolute1, directoryPathAbsolute2, out rebasedPath);
      Debug.Assert(rebasedPath.Path == @&amp;quot;E:\Dir4\Dir1\Dir2\Dir3&amp;quot;);
 
 
      //
      // List of path  ListOfPathsEquals \ Contains \ TryGetCommonRootDirectory 
      //
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list1 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list2 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir2&amp;quot;));
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir3\Dir4&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir3\dir4&amp;quot;));
      Debug.Assert(ListOfPathHelper.ListOfPathsEquals(list1, list2));
      Debug.Assert(ListOfPathHelper.Contains(list1, new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\dir2&amp;quot;)));
      ListOfPathHelper.TryGetCommonRootDirectory(list1, out directoryPathAbsolute1);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1&amp;quot;);
 
      //
      // List of path   GetListOfUniqueDirsAndUniqueFileNames
      //
      List&amp;lt;FilePathAbsolute&amp;gt; list = new List&amp;lt;FilePathAbsolute&amp;gt;();
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\File1.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\dir1\dir2\File2.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\Dir3\file2.txt&amp;quot;));
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listOfUniqueDirs;
      List&amp;lt;string&amp;gt; listOfUniqueFileNames;
      ListOfPathHelper.GetListOfUniqueDirsAndUniqueFileNames(list, out listOfUniqueDirs, out listOfUniqueFileNames);
      Debug.Assert(listOfUniqueDirs.Count == 2);
      Debug.Assert(listOfUniqueDirs[0].Path == @&amp;quot;E:\Dir1\Dir2&amp;quot;);
      Debug.Assert(listOfUniqueDirs[1].Path == @&amp;quot;E:\Dir1\Dir2\Dir3&amp;quot;);
      Debug.Assert(listOfUniqueFileNames.Count == 2);
      Debug.Assert(listOfUniqueFileNames[0] == &amp;quot;File1.txt&amp;quot;);
      Debug.Assert(listOfUniqueFileNames[1] == &amp;quot;File2.txt&amp;quot;);
 
 
      //
      // Interaction with System.IO API
      //
      filePathAbsolute1 = new FilePathAbsolute(
         System.Reflection.Assembly.GetExecutingAssembly().Location);
      Debug.Assert(filePathAbsolute1.Exists);
      System.IO.FileInfo fileInfo = filePathAbsolute1.FileInfo;
 
      directoryPathAbsolute1 = filePathAbsolute1.ParentDirectoryPath as DirectoryPathAbsolute;
      Debug.Assert(directoryPathAbsolute1.Exists);
      System.IO.DirectoryInfo directoryInfo = directoryPathAbsolute1.DirectoryInfo;
 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listSubDir = directoryPathAbsolute1.ChildrenDirectoriesPath;
      List&amp;lt;FilePathAbsolute&amp;gt; listSubFile = directoryPathAbsolute1.ChildrenFilesPath;
 
   }
}
 
&lt;/pre&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 16:30:33 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018043033P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=7</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class &lt;a href="http://msdn2.microsoft.com/en-us/library/system.io.path.aspx" class="externalLink"&gt;System.IO.Path&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt; &lt;br /&gt;Here is some code that shows common &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; use cases:&lt;br /&gt;&lt;pre&gt;
using NDepend.Helpers.FileDirectoryPath;
using System.Diagnostics;
using System.Collections.Generic;
 
class Program {
   static void Main(string[] args) {
      FilePathAbsolute filePathAbsolute1, filePathAbsolute2;
      FilePathRelative filePathRelative1;
      DirectoryPathAbsolute directoryPathAbsolute1;
      DirectoryPathRelative directoryPathRelative1;
 
 
      //
      //  Path normalization
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.Path == @&amp;quot;C:\Dir1\File.txt&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:/Dir1\\Dir2\&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\..\Dir2\.&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir2&amp;quot;);
 
 
      //
      // Path comparison
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      filePathAbsolute2 = new FilePathAbsolute(@&amp;quot;C:\DIR1\FILE.TXT&amp;quot;);
      Debug.Assert(filePathAbsolute1.Equals(filePathAbsolute2));
      Debug.Assert(filePathAbsolute1 == filePathAbsolute2);
 
 
      //
      // Relative -&amp;gt; Absolute path conversion
      //
      filePathRelative1 = new FilePathRelative(@&amp;quot;..\..\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);
      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\Dir2\Dir1\File.txt&amp;quot;);
 
 
      //
      // Absolute -&amp;gt; Relative path conversion
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathRelative1 = filePathAbsolute1.GetPathRelativeFrom(directoryPathAbsolute1);
      Debug.Assert(filePathRelative1.Path == @&amp;quot;..\..\..\Dir1\File.txt&amp;quot;);
 
 
      //
      // Path string validation
      //
      string reason;
      Debug.Assert(PathHelper.IsValidAbsolutePath(@&amp;quot;C:\Dir2\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;C:\..\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;.\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;1:\Dir1&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;..\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;C:\Dir1\Dir2&amp;quot;, out reason));
 
 
      //
      // File name &amp;amp; extension
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileName == &amp;quot;File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileNameWithoutExtension == &amp;quot;File.cs&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileExtension == &amp;quot;.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.HasExtension(&amp;quot;.txt&amp;quot;));
 
 
      //
      // Path browsing
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.Path == @&amp;quot;C:\Dir1&amp;quot;);
      Debug.Assert(filePathAbsolute1.GetBrotherFileWithName(&amp;quot;File.xml&amp;quot;).Path == @&amp;quot;C:\Dir1\File.xml&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;Dir2&amp;quot;).Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;..&amp;quot;).Path == @&amp;quot;C:&amp;quot;);
 
      directoryPathRelative1 = new DirectoryPathRelative(@&amp;quot;..\Dir1\Dir2&amp;quot;);
      Debug.Assert(directoryPathRelative1.ParentDirectoryPath.Path == @&amp;quot;..\Dir1&amp;quot;);
 
 
      //
      // Path rebasing
      //
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2\Dir3&amp;quot;);
      DirectoryPathAbsolute directoryPathAbsolute2 = new DirectoryPathAbsolute(@&amp;quot;E:\Dir4\Dir1&amp;quot;);
      DirectoryPathAbsolute rebasedPath;
      PathHelper.TryRebasePath(directoryPathAbsolute1, directoryPathAbsolute2, out rebasedPath);
      Debug.Assert(rebasedPath.Path == @&amp;quot;E:\Dir4\Dir1\Dir2\Dir3&amp;quot;);
 
 
      //
      // List of path  ListOfPathsEquals \ Contains \ TryGetCommonRootDirectory 
      //
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list1 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list2 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir2&amp;quot;));
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir3\Dir4&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir3\dir4&amp;quot;));
      Debug.Assert(ListOfPathHelper.ListOfPathsEquals(list1, list2));
      Debug.Assert(ListOfPathHelper.Contains(list1, new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\dir2&amp;quot;)));
      ListOfPathHelper.TryGetCommonRootDirectory(list1, out directoryPathAbsolute1);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1&amp;quot;);
 
      //
      // List of path   GetListOfUniqueDirsAndUniqueFileNames
      //
      List&amp;lt;FilePathAbsolute&amp;gt; list = new List&amp;lt;FilePathAbsolute&amp;gt;();
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\File1.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\dir1\dir2\File2.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\Dir3\file2.txt&amp;quot;));
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listOfUniqueDirs;
      List&amp;lt;string&amp;gt; listOfUniqueFileNames;
      ListOfPathHelper.GetListOfUniqueDirsAndUniqueFileNames(list, out listOfUniqueDirs, out listOfUniqueFileNames);
      Debug.Assert(listOfUniqueDirs.Count == 2);
      Debug.Assert(listOfUniqueDirs[0].Path == @&amp;quot;E:\Dir1\Dir2&amp;quot;);
      Debug.Assert(listOfUniqueDirs[1].Path == @&amp;quot;E:\Dir1\Dir2\Dir3&amp;quot;);
      Debug.Assert(listOfUniqueFileNames.Count == 2);
      Debug.Assert(listOfUniqueFileNames[0] == &amp;quot;File1.txt&amp;quot;);
      Debug.Assert(listOfUniqueFileNames[1] == &amp;quot;File2.txt&amp;quot;);
 
 
      //
      // Interaction with System.IO API
      //
      filePathAbsolute1 = new FilePathAbsolute(
         System.Reflection.Assembly.GetExecutingAssembly().Location);
      Debug.Assert(filePathAbsolute1.Exists);
      System.IO.FileInfo fileInfo = filePathAbsolute1.FileInfo;
 
      directoryPathAbsolute1 = filePathAbsolute1.ParentDirectoryPath as DirectoryPathAbsolute;
      Debug.Assert(directoryPathAbsolute1.Exists);
      System.IO.DirectoryInfo directoryInfo = directoryPathAbsolute1.DirectoryInfo;
 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listSubDir = directoryPathAbsolute1.ChildrenDirectoriesPath;
      List&amp;lt;FilePathAbsolute&amp;gt; listSubFile = directoryPathAbsolute1.ChildrenFilesPath;
 
   }
}
 
&lt;/pre&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 13:01:13 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018010113P</guid></item><item><title>UPDATED RELEASE: FileDirectoryPath 1.0 (oct. 10, 2007)</title><link>http://www.codeplex.com/FileDirectoryPath/Release/ProjectReleases.aspx?ReleaseId=7817</link><description>Initial Release</description><author></author><pubDate>Thu, 18 Oct 2007 12:44:05 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: FileDirectoryPath 1.0 (oct. 10, 2007) 20071018124405P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=6</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class &lt;a href="http://msdn2.microsoft.com/en-us/library/system.io.path.aspx" class="externalLink"&gt;System.IO.Path&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt; &lt;br /&gt;Her is some code that shows common &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; use cases:&lt;br /&gt;&lt;pre&gt;
using NDepend.Helpers.FileDirectoryPath;
using System.Diagnostics;
using System.Collections.Generic;
 
class Program {
   static void Main(string[] args) {
      FilePathAbsolute filePathAbsolute1, filePathAbsolute2;
      FilePathRelative filePathRelative1;
      DirectoryPathAbsolute directoryPathAbsolute1;
      DirectoryPathRelative directoryPathRelative1;
 
 
      //
      //  Path normalization
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.Path == @&amp;quot;C:\Dir1\File.txt&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:/Dir1\\Dir2\&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\..\Dir2\.&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir2&amp;quot;);
 
 
      //
      // Path comparison
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      filePathAbsolute2 = new FilePathAbsolute(@&amp;quot;C:\DIR1\FILE.TXT&amp;quot;);
      Debug.Assert(filePathAbsolute1.Equals(filePathAbsolute2));
      Debug.Assert(filePathAbsolute1 == filePathAbsolute2);
 
 
      //
      // Relative -&amp;gt; Absolute path conversion
      //
      filePathRelative1 = new FilePathRelative(@&amp;quot;..\..\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);
      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\Dir2\Dir1\File.txt&amp;quot;);
 
 
      //
      // Absolute -&amp;gt; Relative path conversion
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathRelative1 = filePathAbsolute1.GetPathRelativeFrom(directoryPathAbsolute1);
      Debug.Assert(filePathRelative1.Path == @&amp;quot;..\..\..\Dir1\File.txt&amp;quot;);
 
 
      //
      // Path string validation
      //
      string reason;
      Debug.Assert(PathHelper.IsValidAbsolutePath(@&amp;quot;C:\Dir2\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;C:\..\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;.\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;1:\Dir1&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;..\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;C:\Dir1\Dir2&amp;quot;, out reason));
 
 
      //
      // File name &amp;amp; extension
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileName == &amp;quot;File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileNameWithoutExtension == &amp;quot;File.cs&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileExtension == &amp;quot;.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.HasExtension(&amp;quot;.txt&amp;quot;));
 
 
      //
      // Path browsing
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.Path == @&amp;quot;C:\Dir1&amp;quot;);
      Debug.Assert(filePathAbsolute1.GetBrotherFileWithName(&amp;quot;File.xml&amp;quot;).Path == @&amp;quot;C:\Dir1\File.xml&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;Dir2&amp;quot;).Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;..&amp;quot;).Path == @&amp;quot;C:&amp;quot;);
 
      directoryPathRelative1 = new DirectoryPathRelative(@&amp;quot;..\Dir1\Dir2&amp;quot;);
      Debug.Assert(directoryPathRelative1.ParentDirectoryPath.Path == @&amp;quot;..\Dir1&amp;quot;);
 
 
      //
      // Path rebasing
      //
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2\Dir3&amp;quot;);
      DirectoryPathAbsolute directoryPathAbsolute2 = new DirectoryPathAbsolute(@&amp;quot;E:\Dir4\Dir1&amp;quot;);
      DirectoryPathAbsolute rebasedPath;
      PathHelper.TryRebasePath(directoryPathAbsolute1, directoryPathAbsolute2, out rebasedPath);
      Debug.Assert(rebasedPath.Path == @&amp;quot;E:\Dir4\Dir1\Dir2\Dir3&amp;quot;);
 
 
      //
      // List of path  ListOfPathsEquals \ Contains \ TryGetCommonRootDirectory 
      //
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list1 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list2 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir2&amp;quot;));
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir3\Dir4&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir3\dir4&amp;quot;));
      Debug.Assert(ListOfPathHelper.ListOfPathsEquals(list1, list2));
      Debug.Assert(ListOfPathHelper.Contains(list1, new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\dir2&amp;quot;)));
      ListOfPathHelper.TryGetCommonRootDirectory(list1, out directoryPathAbsolute1);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1&amp;quot;);
 
      //
      // List of path   GetListOfUniqueDirsAndUniqueFileNames
      //
      List&amp;lt;FilePathAbsolute&amp;gt; list = new List&amp;lt;FilePathAbsolute&amp;gt;();
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\File1.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\dir1\dir2\File2.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\Dir3\file2.txt&amp;quot;));
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listOfUniqueDirs;
      List&amp;lt;string&amp;gt; listOfUniqueFileNames;
      ListOfPathHelper.GetListOfUniqueDirsAndUniqueFileNames(list, out listOfUniqueDirs, out listOfUniqueFileNames);
      Debug.Assert(listOfUniqueDirs.Count == 2);
      Debug.Assert(listOfUniqueDirs[0].Path == @&amp;quot;E:\Dir1\Dir2&amp;quot;);
      Debug.Assert(listOfUniqueDirs[1].Path == @&amp;quot;E:\Dir1\Dir2\Dir3&amp;quot;);
      Debug.Assert(listOfUniqueFileNames.Count == 2);
      Debug.Assert(listOfUniqueFileNames[0] == &amp;quot;File1.txt&amp;quot;);
      Debug.Assert(listOfUniqueFileNames[1] == &amp;quot;File2.txt&amp;quot;);
 
 
      //
      // Interaction with System.IO API
      //
      filePathAbsolute1 = new FilePathAbsolute(
         System.Reflection.Assembly.GetExecutingAssembly().Location);
      Debug.Assert(filePathAbsolute1.Exists);
      System.IO.FileInfo fileInfo = filePathAbsolute1.FileInfo;
 
      directoryPathAbsolute1 = filePathAbsolute1.ParentDirectoryPath as DirectoryPathAbsolute;
      Debug.Assert(directoryPathAbsolute1.Exists);
      System.IO.DirectoryInfo directoryInfo = directoryPathAbsolute1.DirectoryInfo;
 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listSubDir = directoryPathAbsolute1.ChildrenDirectoriesPath;
      List&amp;lt;FilePathAbsolute&amp;gt; listSubFile = directoryPathAbsolute1.ChildrenFilesPath;
 
   }
}
 
&lt;/pre&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 12:35:02 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018123502P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=5</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.NDepend.com" class="externalLink"&gt;NDepend&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fmsdn2.microsoft.com%2fen-us%2flibrary%2fsystem.io.path.aspx&amp;amp;referringTitle=Home"&gt;System.IO.Path&lt;/a&gt; include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fwww.NDepend.com&amp;amp;referringTitle=Home"&gt;NDepend&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt; &lt;br /&gt;Her is some code that shows common &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; use cases:&lt;br /&gt;&lt;pre&gt;
using NDepend.Helpers.FileDirectoryPath;
using System.Diagnostics;
using System.Collections.Generic;
 
class Program {
   static void Main(string[] args) {
      FilePathAbsolute filePathAbsolute1, filePathAbsolute2;
      FilePathRelative filePathRelative1;
      DirectoryPathAbsolute directoryPathAbsolute1;
      DirectoryPathRelative directoryPathRelative1;
 
 
      //
      //  Path normalization
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.Path == @&amp;quot;C:\Dir1\File.txt&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:/Dir1\\Dir2\&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\..\Dir2\.&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir2&amp;quot;);
 
 
      //
      // Path comparison
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      filePathAbsolute2 = new FilePathAbsolute(@&amp;quot;C:\DIR1\FILE.TXT&amp;quot;);
      Debug.Assert(filePathAbsolute1.Equals(filePathAbsolute2));
      Debug.Assert(filePathAbsolute1 == filePathAbsolute2);
 
 
      //
      // Relative -&amp;gt; Absolute path conversion
      //
      filePathRelative1 = new FilePathRelative(@&amp;quot;..\..\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);
      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\Dir2\Dir1\File.txt&amp;quot;);
 
 
      //
      // Absolute -&amp;gt; Relative path conversion
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathRelative1 = filePathAbsolute1.GetPathRelativeFrom(directoryPathAbsolute1);
      Debug.Assert(filePathRelative1.Path == @&amp;quot;..\..\..\Dir1\File.txt&amp;quot;);
 
 
      //
      // Path string validation
      //
      string reason;
      Debug.Assert(PathHelper.IsValidAbsolutePath(@&amp;quot;C:\Dir2\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;C:\..\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;.\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;1:\Dir1&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;..\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;C:\Dir1\Dir2&amp;quot;, out reason));
 
 
      //
      // File name &amp;amp; extension
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileName == &amp;quot;File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileNameWithoutExtension == &amp;quot;File.cs&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileExtension == &amp;quot;.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.HasExtension(&amp;quot;.txt&amp;quot;));
 
 
      //
      // Path browsing
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.Path == @&amp;quot;C:\Dir1&amp;quot;);
      Debug.Assert(filePathAbsolute1.GetBrotherFileWithName(&amp;quot;File.xml&amp;quot;).Path == @&amp;quot;C:\Dir1\File.xml&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;Dir2&amp;quot;).Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;..&amp;quot;).Path == @&amp;quot;C:&amp;quot;);
 
      directoryPathRelative1 = new DirectoryPathRelative(@&amp;quot;..\Dir1\Dir2&amp;quot;);
      Debug.Assert(directoryPathRelative1.ParentDirectoryPath.Path == @&amp;quot;..\Dir1&amp;quot;);
 
 
      //
      // Path rebasing
      //
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2\Dir3&amp;quot;);
      DirectoryPathAbsolute directoryPathAbsolute2 = new DirectoryPathAbsolute(@&amp;quot;E:\Dir4\Dir1&amp;quot;);
      DirectoryPathAbsolute rebasedPath;
      PathHelper.TryRebasePath(directoryPathAbsolute1, directoryPathAbsolute2, out rebasedPath);
      Debug.Assert(rebasedPath.Path == @&amp;quot;E:\Dir4\Dir1\Dir2\Dir3&amp;quot;);
 
 
      //
      // List of path  ListOfPathsEquals \ Contains \ TryGetCommonRootDirectory 
      //
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list1 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list2 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir2&amp;quot;));
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir3\Dir4&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir3\dir4&amp;quot;));
      Debug.Assert(ListOfPathHelper.ListOfPathsEquals(list1, list2));
      Debug.Assert(ListOfPathHelper.Contains(list1, new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\dir2&amp;quot;)));
      ListOfPathHelper.TryGetCommonRootDirectory(list1, out directoryPathAbsolute1);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1&amp;quot;);
 
      //
      // List of path   GetListOfUniqueDirsAndUniqueFileNames
      //
      List&amp;lt;FilePathAbsolute&amp;gt; list = new List&amp;lt;FilePathAbsolute&amp;gt;();
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\File1.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\dir1\dir2\File2.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\Dir3\file2.txt&amp;quot;));
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listOfUniqueDirs;
      List&amp;lt;string&amp;gt; listOfUniqueFileNames;
      ListOfPathHelper.GetListOfUniqueDirsAndUniqueFileNames(list, out listOfUniqueDirs, out listOfUniqueFileNames);
      Debug.Assert(listOfUniqueDirs.Count == 2);
      Debug.Assert(listOfUniqueDirs[0].Path == @&amp;quot;E:\Dir1\Dir2&amp;quot;);
      Debug.Assert(listOfUniqueDirs[1].Path == @&amp;quot;E:\Dir1\Dir2\Dir3&amp;quot;);
      Debug.Assert(listOfUniqueFileNames.Count == 2);
      Debug.Assert(listOfUniqueFileNames[0] == &amp;quot;File1.txt&amp;quot;);
      Debug.Assert(listOfUniqueFileNames[1] == &amp;quot;File2.txt&amp;quot;);
 
 
      //
      // Interaction with System.IO API
      //
      filePathAbsolute1 = new FilePathAbsolute(
         System.Reflection.Assembly.GetExecutingAssembly().Location);
      Debug.Assert(filePathAbsolute1.Exists);
      System.IO.FileInfo fileInfo = filePathAbsolute1.FileInfo;
 
      directoryPathAbsolute1 = filePathAbsolute1.ParentDirectoryPath as DirectoryPathAbsolute;
      Debug.Assert(directoryPathAbsolute1.Exists);
      System.IO.DirectoryInfo directoryInfo = directoryPathAbsolute1.DirectoryInfo;
 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listSubDir = directoryPathAbsolute1.ChildrenDirectoriesPath;
      List&amp;lt;FilePathAbsolute&amp;gt; listSubFile = directoryPathAbsolute1.ChildrenFilesPath;
 
   }
}
 
&lt;/pre&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 12:34:27 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018123427P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=4</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fwww.NDepend.com&amp;amp;referringTitle=Home"&gt;NDepend&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fmsdn2.microsoft.com%2fen-us%2flibrary%2fsystem.io.path.aspx&amp;amp;referringTitle=Home"&gt;System.IO.Path&lt;/a&gt; include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fwww.NDepend.com&amp;amp;referringTitle=Home"&gt;NDepend&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt; &lt;br /&gt;Her is some code that shows common &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; use cases:&lt;br /&gt;&lt;pre&gt;
using NDepend.Helpers.FileDirectoryPath;
using System.Diagnostics;
using System.Collections.Generic;
 
class Program {
   static void Main(string[] args) {
      FilePathAbsolute filePathAbsolute1, filePathAbsolute2;
      FilePathRelative filePathRelative1;
      DirectoryPathAbsolute directoryPathAbsolute1;
      DirectoryPathRelative directoryPathRelative1;
 
 
      //
      //  Path normalization
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.Path == @&amp;quot;C:\Dir1\File.txt&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:/Dir1\\Dir2\&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\..\Dir2\.&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir2&amp;quot;);
 
 
      //
      // Path comparison
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      filePathAbsolute2 = new FilePathAbsolute(@&amp;quot;C:\DIR1\FILE.TXT&amp;quot;);
      Debug.Assert(filePathAbsolute1.Equals(filePathAbsolute2));
      Debug.Assert(filePathAbsolute1 == filePathAbsolute2);
 
 
      //
      // Relative -&amp;gt; Absolute path conversion
      //
      filePathRelative1 = new FilePathRelative(@&amp;quot;..\..\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);
      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\Dir2\Dir1\File.txt&amp;quot;);
 
 
      //
      // Absolute -&amp;gt; Relative path conversion
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathRelative1 = filePathAbsolute1.GetPathRelativeFrom(directoryPathAbsolute1);
      Debug.Assert(filePathRelative1.Path == @&amp;quot;..\..\..\Dir1\File.txt&amp;quot;);
 
 
      //
      // Path string validation
      //
      string reason;
      Debug.Assert(PathHelper.IsValidAbsolutePath(@&amp;quot;C:\Dir2\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;C:\..\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;.\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;1:\Dir1&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;..\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;C:\Dir1\Dir2&amp;quot;, out reason));
 
 
      //
      // File name &amp;amp; extension
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileName == &amp;quot;File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileNameWithoutExtension == &amp;quot;File.cs&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileExtension == &amp;quot;.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.HasExtension(&amp;quot;.txt&amp;quot;));
 
 
      //
      // Path browsing
      //
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.Path == @&amp;quot;C:\Dir1&amp;quot;);
      Debug.Assert(filePathAbsolute1.GetBrotherFileWithName(&amp;quot;File.xml&amp;quot;).Path == @&amp;quot;C:\Dir1\File.xml&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;Dir2&amp;quot;).Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;..&amp;quot;).Path == @&amp;quot;C:&amp;quot;);
 
      directoryPathRelative1 = new DirectoryPathRelative(@&amp;quot;..\Dir1\Dir2&amp;quot;);
      Debug.Assert(directoryPathRelative1.ParentDirectoryPath.Path == @&amp;quot;..\Dir1&amp;quot;);
 
 
      //
      // Path rebasing
      //
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2\Dir3&amp;quot;);
      DirectoryPathAbsolute directoryPathAbsolute2 = new DirectoryPathAbsolute(@&amp;quot;E:\Dir4\Dir1&amp;quot;);
      DirectoryPathAbsolute rebasedPath;
      PathHelper.TryRebasePath(directoryPathAbsolute1, directoryPathAbsolute2, out rebasedPath);
      Debug.Assert(rebasedPath.Path == @&amp;quot;E:\Dir4\Dir1\Dir2\Dir3&amp;quot;);
 
 
      //
      // List of path  ListOfPathsEquals \ Contains \ TryGetCommonRootDirectory 
      //
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list1 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list2 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir2&amp;quot;));
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir3\Dir4&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir3\dir4&amp;quot;));
      Debug.Assert(ListOfPathHelper.ListOfPathsEquals(list1, list2));
      Debug.Assert(ListOfPathHelper.Contains(list1, new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\dir2&amp;quot;)));
      ListOfPathHelper.TryGetCommonRootDirectory(list1, out directoryPathAbsolute1);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1&amp;quot;);
 
      //
      // List of path   GetListOfUniqueDirsAndUniqueFileNames
      //
      List&amp;lt;FilePathAbsolute&amp;gt; list = new List&amp;lt;FilePathAbsolute&amp;gt;();
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\File1.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\dir1\dir2\File2.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\Dir3\file2.txt&amp;quot;));
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listOfUniqueDirs;
      List&amp;lt;string&amp;gt; listOfUniqueFileNames;
      ListOfPathHelper.GetListOfUniqueDirsAndUniqueFileNames(list, out listOfUniqueDirs, out listOfUniqueFileNames);
      Debug.Assert(listOfUniqueDirs.Count == 2);
      Debug.Assert(listOfUniqueDirs[0].Path == @&amp;quot;E:\Dir1\Dir2&amp;quot;);
      Debug.Assert(listOfUniqueDirs[1].Path == @&amp;quot;E:\Dir1\Dir2\Dir3&amp;quot;);
      Debug.Assert(listOfUniqueFileNames.Count == 2);
      Debug.Assert(listOfUniqueFileNames[0] == &amp;quot;File1.txt&amp;quot;);
      Debug.Assert(listOfUniqueFileNames[1] == &amp;quot;File2.txt&amp;quot;);
 
 
      //
      // Interaction with System.IO API
      //
      filePathAbsolute1 = new FilePathAbsolute(
         System.Reflection.Assembly.GetExecutingAssembly().Location);
      Debug.Assert(filePathAbsolute1.Exists);
      System.IO.FileInfo fileInfo = filePathAbsolute1.FileInfo;
 
      directoryPathAbsolute1 = filePathAbsolute1.ParentDirectoryPath as DirectoryPathAbsolute;
      Debug.Assert(directoryPathAbsolute1.Exists);
      System.IO.DirectoryInfo directoryInfo = directoryPathAbsolute1.DirectoryInfo;
 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listSubDir = directoryPathAbsolute1.ChildrenDirectoriesPath;
      List&amp;lt;FilePathAbsolute&amp;gt; listSubFile = directoryPathAbsolute1.ChildrenFilesPath;
 
   }
}
 
&lt;/pre&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 12:32:56 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018123256P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fwww.NDepend.com&amp;amp;referringTitle=Home"&gt;NDepend&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fmsdn2.microsoft.com%2fen-us%2flibrary%2fsystem.io.path.aspx&amp;amp;referringTitle=Home"&gt;System.IO.Path&lt;/a&gt; include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fwww.NDepend.com&amp;amp;referringTitle=Home"&gt;NDepend&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt; &lt;br /&gt;Her is some code that shows common &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; use cases:&lt;br /&gt;&lt;pre&gt;
using NDepend.Helpers.FileDirectoryPath;
using System.Diagnostics;
using System.Collections.Generic;
 
class Program {
   static void Main(string[] args) {
      FilePathAbsolute filePathAbsolute1, filePathAbsolute2;
      FilePathRelative filePathRelative1;
      DirectoryPathAbsolute directoryPathAbsolute1;
      DirectoryPathRelative directoryPathRelative1;
 
 
 
      //  Path normalization
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.Path == @&amp;quot;C:\Dir1\File.txt&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:/Dir1\\Dir2\&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
 
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\..\Dir2\.&amp;quot;);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir2&amp;quot;);
 
 
 
      // Path comparison
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:/Dir1\\File.txt&amp;quot;);
      filePathAbsolute2 = new FilePathAbsolute(@&amp;quot;C:\DIR1\FILE.TXT&amp;quot;);
      Debug.Assert(filePathAbsolute1.Equals(filePathAbsolute2));
      Debug.Assert(filePathAbsolute1 == filePathAbsolute2);
 
 
 
      // Relative -&amp;gt; Absolute path conversion
      filePathRelative1 = new FilePathRelative(@&amp;quot;..\..\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathAbsolute1 = filePathRelative1.GetAbsolutePathFrom(directoryPathAbsolute1);
      Debug.Assert( filePathAbsolute1.Path == @&amp;quot;C:\Dir2\Dir1\File.txt&amp;quot;);
 
 
 
      // Absolute -&amp;gt; Relative path conversion
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.txt&amp;quot;);
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir2\Dir3\Dir4&amp;quot;);
      filePathRelative1 = filePathAbsolute1.GetPathRelativeFrom(directoryPathAbsolute1);
      Debug.Assert(filePathRelative1.Path == @&amp;quot;..\..\..\Dir1\File.txt&amp;quot;);
 
 
 
      // Path string validation
      string reason;
      Debug.Assert(PathHelper.IsValidAbsolutePath(@&amp;quot;C:\Dir2\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;C:\..\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;.\Dir1&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidAbsolutePath(@&amp;quot;1:\Dir1&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;..\Dir1\Dir2&amp;quot;, out reason));
      Debug.Assert(PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;.\Dir1\..\..\Dir2&amp;quot;, out reason));
      Debug.Assert(!PathHelper.IsValidRelativePath(@&amp;quot;C:\Dir1\Dir2&amp;quot;, out reason));
 
 
 
      // File name &amp;amp; extension
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileName == &amp;quot;File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileNameWithoutExtension == &amp;quot;File.cs&amp;quot;);
      Debug.Assert(filePathAbsolute1.FileExtension == &amp;quot;.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.HasExtension(&amp;quot;.txt&amp;quot;));
 
 
 
      // Path browsing
      filePathAbsolute1 = new FilePathAbsolute(@&amp;quot;C:\Dir1\File.cs.Txt&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.Path == @&amp;quot;C:\Dir1&amp;quot;);
      Debug.Assert(filePathAbsolute1.GetBrotherFileWithName(&amp;quot;File.xml&amp;quot;).Path == @&amp;quot;C:\Dir1\File.xml&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;Dir2&amp;quot;).Path == @&amp;quot;C:\Dir1\Dir2&amp;quot;);
      Debug.Assert(filePathAbsolute1.ParentDirectoryPath.GetChildDirectoryWithName(&amp;quot;..&amp;quot;).Path == @&amp;quot;C:&amp;quot;);
 
      directoryPathRelative1 = new DirectoryPathRelative(@&amp;quot;..\Dir1\Dir2&amp;quot;);
      Debug.Assert(directoryPathRelative1.ParentDirectoryPath.Path == @&amp;quot;..\Dir1&amp;quot;);
 
 
 
      // Path rebasing
      directoryPathAbsolute1 = new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2\Dir3&amp;quot;);
      DirectoryPathAbsolute directoryPathAbsolute2 = new DirectoryPathAbsolute(@&amp;quot;E:\Dir4\Dir1&amp;quot;);
      DirectoryPathAbsolute rebasedPath;
      PathHelper.TryRebasePath(directoryPathAbsolute1, directoryPathAbsolute2, out rebasedPath);
      Debug.Assert(rebasedPath.Path == @&amp;quot;E:\Dir4\Dir1\Dir2\Dir3&amp;quot;);
 
 
      // List of path  ListOfPathsEquals \ Contains \ TryGetCommonRootDirectory 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list1 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      List&amp;lt;DirectoryPathAbsolute&amp;gt; list2 = new List&amp;lt;DirectoryPathAbsolute&amp;gt;();
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir2&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir2&amp;quot;));
      list1.Add(new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\Dir3\Dir4&amp;quot;));
      list2.Add(new DirectoryPathAbsolute(@&amp;quot;c:\dir1\dir3\dir4&amp;quot;));
      Debug.Assert(ListOfPathHelper.ListOfPathsEquals(list1, list2));
      Debug.Assert(ListOfPathHelper.Contains(list1, new DirectoryPathAbsolute(@&amp;quot;C:\Dir1\dir2&amp;quot;)));
      ListOfPathHelper.TryGetCommonRootDirectory(list1, out directoryPathAbsolute1);
      Debug.Assert(directoryPathAbsolute1.Path == @&amp;quot;C:\Dir1&amp;quot;);
 
 
      // List of path   GetListOfUniqueDirsAndUniqueFileNames
      List&amp;lt;FilePathAbsolute&amp;gt; list = new List&amp;lt;FilePathAbsolute&amp;gt;();
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\File1.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\dir1\dir2\File2.txt&amp;quot;));
      list.Add(new FilePathAbsolute(@&amp;quot;E:\Dir1\Dir2\Dir3\file2.txt&amp;quot;));
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listOfUniqueDirs;
      List&amp;lt;string&amp;gt; listOfUniqueFileNames;
      ListOfPathHelper.GetListOfUniqueDirsAndUniqueFileNames(list, out listOfUniqueDirs, out listOfUniqueFileNames);
      Debug.Assert(listOfUniqueDirs.Count == 2);
      Debug.Assert(listOfUniqueDirs[0].Path == @&amp;quot;E:\Dir1\Dir2&amp;quot;);
      Debug.Assert(listOfUniqueDirs[1].Path == @&amp;quot;E:\Dir1\Dir2\Dir3&amp;quot;);
      Debug.Assert(listOfUniqueFileNames.Count == 2);
      Debug.Assert(listOfUniqueFileNames[0] == &amp;quot;File1.txt&amp;quot;);
      Debug.Assert(listOfUniqueFileNames[1] == &amp;quot;File2.txt&amp;quot;);
 
 
      // Interaction with System.IO API
      filePathAbsolute1 = new FilePathAbsolute(
         System.Reflection.Assembly.GetExecutingAssembly().Location);
      Debug.Assert(filePathAbsolute1.Exists);
      System.IO.FileInfo fileInfo = filePathAbsolute1.FileInfo;
 
      directoryPathAbsolute1 = filePathAbsolute1.ParentDirectoryPath as DirectoryPathAbsolute;
      Debug.Assert(directoryPathAbsolute1.Exists);
      System.IO.DirectoryInfo directoryInfo = directoryPathAbsolute1.DirectoryInfo;
 
      List&amp;lt;DirectoryPathAbsolute&amp;gt; listSubDir = directoryPathAbsolute1.ChildrenDirectoriesPath;
      List&amp;lt;FilePathAbsolute&amp;gt; listSubFile = directoryPathAbsolute1.ChildrenFilesPath;
 
   }
}
&lt;/pre&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 12:31:29 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018123129P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=Home&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is the library used by the tool  &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fwww.NDepend.com&amp;amp;referringTitle=Home"&gt;NDepend&lt;/a&gt; to handle common &lt;b&gt;path&lt;/b&gt; operations. Benefits of the &lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; over the .NET Framework class [System.IO.Path|http://msdn2.microsoft.com/en-us/library/system.io.path.aspx| include:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Strongly typed File/Directory path.&lt;/li&gt;&lt;li&gt;Relative / absolute path conversion.&lt;/li&gt;&lt;li&gt;Path normalization API&lt;/li&gt;&lt;li&gt;Path validity check API&lt;/li&gt;&lt;li&gt;Path comparison API&lt;/li&gt;&lt;li&gt;Path browsing API.&lt;/li&gt;&lt;li&gt;Path rebasing API&lt;/li&gt;&lt;li&gt;List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is 100% unit-tested and tests code is provided with the source code.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend.Helpers.FilePathDirectory&lt;/b&gt; is freely proposed by the company SMACCHIA.COM SARL. Download the trial edition of our flagship product: &lt;a href="http://www.codeplex.com/FileDirectoryPath/Wiki/View.aspx?title=http%3a%2f%2fwww.NDepend.com&amp;amp;referringTitle=Home"&gt;NDepend&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt;NDepend&lt;/b&gt; is a tool for .NET developers. It is a static analyzer that simplifies managing a complex .NET code base.&lt;br /&gt;
&lt;/div&gt;</description><author>PatrickSmacchia</author><pubDate>Thu, 18 Oct 2007 12:23:00 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20071018122300P</guid></item></channel></rss>