Beispiel #1
0
        public override void Build(IBounce bounce)
        {
            foreach (var file in Directory.GetFiles(".", Path.Value))
            {
                bounce.Log.Debug("deleting file: `{0}'", file);
                File.Delete(file);
            }

            foreach (var directory in Directory.GetDirectories(".", Path.Value))
            {
                bounce.Log.Debug("deleting directory: `{0}'", directory);
                DirectoryUtils.DeleteDirectory(directory);
            }
        }
Beispiel #2
0
 public void Delete(string path)
 {
     if (DirectoryUtils.DirectoryExists(path))
     {
         DirectoryUtils.DeleteDirectory(path);
     }
     else if (FileUtils.FileExists(path))
     {
         FileUtils.DeleteFile(path);
     }
     else
     {
         throw new FileNotFoundException(String.Format("file not found `{0}'", path));
     }
 }
Beispiel #3
0
 public override void Clean()
 {
     DirectoryUtils.DeleteDirectory(WorkingDirectory);
 }
Beispiel #4
0
 public void DeleteDirectory(string dir)
 {
     DirectoryUtils.DeleteDirectory(dir);
 }