Exemplo n.º 1
0
        /// <exception cref="System.Exception"/>
        public virtual void TestCwdContents()
        {
            string   dirString = Path.CurDir;
            PathData item      = new PathData(dirString, conf);

            PathData[] items = item.GetDirectoryContents();
            Assert.Equal(SortedString("d1", "d2"), SortedString(items));
        }
Exemplo n.º 2
0
        /// <exception cref="System.Exception"/>
        public virtual void TestUnqualifiedUriContents()
        {
            string   dirString = "d1";
            PathData item      = new PathData(dirString, conf);

            PathData[] items = item.GetDirectoryContents();
            Assert.Equal(SortedString("d1/f1", "d1/f1.1", "d1/f2"), SortedString
                             (items));
        }
Exemplo n.º 3
0
        /// <exception cref="System.Exception"/>
        public virtual void TestQualifiedUriContents()
        {
            string   dirString = fs.MakeQualified(new Path("d1")).ToString();
            PathData item      = new PathData(dirString, conf);

            PathData[] items = item.GetDirectoryContents();
            Assert.Equal(SortedString(dirString + "/f1", dirString + "/f1.1"
                                      , dirString + "/f2"), SortedString(items));
        }
Exemplo n.º 4
0
 /// <summary>
 /// Gets the directory listing for a path and invokes
 /// <see cref="ProcessPaths(PathData, PathData[])"/>
 /// </summary>
 /// <param name="item">
 ///
 /// <see cref="PathData"/>
 /// for directory to recurse into
 /// </param>
 /// <exception cref="System.IO.IOException">if anything goes wrong...</exception>
 protected internal virtual void RecursePath(PathData item)
 {
     try
     {
         depth++;
         ProcessPaths(item, item.GetDirectoryContents());
     }
     finally
     {
         depth--;
     }
 }