Exemplo n.º 1
0
 /// <summary>
 /// Cleans the specified directory.
 /// </summary>
 /// <example>
 /// <code>
 /// CleanDirectory("./src/Cake.Common/obj", fileSystemInfo=>!fileSystemInfo.Hidden);
 /// </code>
 /// </example>
 /// <param name="env">The context.</param>
 /// <param name="path">The directory path.</param>
 /// <param name="predicate">Predicate used to determine which files/directories should get deleted.</param>
 /// <exception cref="ArgumentNullException"><paramref name="env"/> or <paramref name="path"/>
 ///  or <paramref name="predicate"/> is <see langword="null"/></exception>
 /// <exception cref="InvalidOperationException">Cannot clean directory when <paramref name="env.FS"/> is null.
 /// </exception>
 public static void CleanDirectory(this IFileSystemEnvironment env, DirectoryPath path,
                                   Func <IFileSystemInfo, bool> predicate)
 {
     DirectoryCleaner.Clean(env, path, predicate);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Cleans the specified directory.
 /// </summary>
 /// <example>
 /// <code>
 /// CleanDirectory("./src/Cake.Common/obj");
 /// </code>
 /// </example>
 /// <param name="env">The context.</param>
 /// <param name="path">The directory path.</param>
 /// <exception cref="ArgumentNullException">env or path is
 ///  <see langword="null"/></exception>
 /// <exception cref="InvalidOperationException">Cannot clean directory when <paramref name="env.FS"/> is null.
 /// </exception>
 public static void CleanDirectory(this IFileSystemEnvironment env, DirectoryPath path)
 {
     DirectoryCleaner.Clean(env, path);
 }