Ejemplo n.º 1
0
 /// <exception cref="System.Exception"/>
 public virtual void TestRelativeGlobBack()
 {
     fs.SetWorkingDirectory(new Path("d1"));
     PathData[] items = PathData.ExpandAsGlob("../d2/*", conf);
     Assert.Equal(SortedString("../d2/f3"), SortedString(items));
 }
Ejemplo n.º 2
0
 /// <exception cref="System.Exception"/>
 public virtual void TestRelativeGlob()
 {
     PathData[] items = PathData.ExpandAsGlob("d1/f1*", conf);
     Assert.Equal(SortedString("d1/f1", "d1/f1.1"), SortedString(items
                                                                 ));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Hook for commands to implement an operation to be applied on each
 /// path for the command after being processed successfully
 /// </summary>
 /// <param name="item">
 /// a
 /// <see cref="PathData"/>
 /// object
 /// </param>
 /// <exception cref="System.IO.IOException">if anything goes wrong...</exception>
 protected internal virtual void PostProcessPath(PathData item)
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Hook for commands to implement an operation to be applied on each
 /// path for the command.
 /// </summary>
 /// <remarks>
 /// Hook for commands to implement an operation to be applied on each
 /// path for the command.  Note implementation of this method is optional
 /// if earlier methods in the chain handle the operation.
 /// </remarks>
 /// <param name="item">
 /// a
 /// <see cref="PathData"/>
 /// object
 /// </param>
 /// <exception cref="RuntimeException">if invoked but not implemented</exception>
 /// <exception cref="System.IO.IOException">if anything else goes wrong in the user-implementation
 ///     </exception>
 protected internal virtual void ProcessPath(PathData item)
 {
     throw new RuntimeException("processPath() is not implemented");
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Determines whether a
 /// <see cref="PathData"/>
 /// item is recursable. Default
 /// implementation is to recurse directories but can be overridden to recurse
 /// through symbolic links.
 /// </summary>
 /// <param name="item">
 /// a
 /// <see cref="PathData"/>
 /// object
 /// </param>
 /// <returns>true if the item is recursable, false otherwise</returns>
 /// <exception cref="System.IO.IOException">if anything goes wrong in the user-implementation
 ///     </exception>
 protected internal virtual bool IsPathRecursable(PathData item)
 {
     return(item.stat.IsDirectory());
 }
Ejemplo n.º 6
0
 /// <summary>Provides a hook for handling paths that don't exist.</summary>
 /// <remarks>
 /// Provides a hook for handling paths that don't exist.  By default it
 /// will throw an exception.  Primarily overriden by commands that create
 /// paths such as mkdir or touch.
 /// </remarks>
 /// <param name="item">
 /// the
 /// <see cref="PathData"/>
 /// that doesn't exist
 /// </param>
 /// <exception cref="System.IO.FileNotFoundException">if arg is a path and it doesn't exist
 ///     </exception>
 /// <exception cref="System.IO.IOException">if anything else goes wrong...</exception>
 protected internal virtual void ProcessNonexistentPath(PathData item)
 {
     throw new PathNotFoundException(item.ToString());
 }