예제 #1
0
        public override void Build()
        {
            var zipFileName = ZipFileName.Value;
            var directory   = Directory.Value;

            if (!FileUtils.FileExists(zipFileName) || (FileUtils.LastWriteTimeForFile(zipFileName) < DirectoryUtils.GetLastModTimeForDirectory(directory)))
            {
                FileUtils.DeleteFile(zipFileName);
                ZipFileCreator.CreateZipFile(zipFileName, directory);
            }
        }
예제 #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));
     }
 }
예제 #3
0
 public void DeleteFile(string file)
 {
     FileUtils.DeleteFile(file);
 }