Package org.bladerunnerjs.utility.filemodification

Examples of org.bladerunnerjs.utility.filemodification.InfoFileModifiedChecker


    return fileModificationChecker;
  }
 
  public void setDirObserver(FileModificationInfo fileModificationInfo)
  {
    this.fileModificationChecker = new InfoFileModifiedChecker(fileModificationInfo);
  }
View Full Code Here


  private List<File> dirs = Collections.emptyList();
 
  public StandardFileIterator(FileModificationInfo fileModificationInfo, File dir, FileInfoAccessor fileInfoAccessor) {
    this.dir = dir;
    this.fileInfoAccessor = fileInfoAccessor;
    fileModificationChecker = new InfoFileModifiedChecker(fileModificationInfo);
  }
View Full Code Here

      throw new IllegalStateException("At least one directory or file must be provided within the watch list.");
    }
   
    File primaryFile = watchItems[0];
    for(File file : watchItems) {
      watchList.add(new InfoFileModifiedChecker(rootNode.getFileSetInfo(file, primaryFile)));
    }
  }
View Full Code Here

    FileUtils.forceDelete(new File(tempDir,  filePath));
  }
 
  private void watch(String filePath) {
    FileModificationInfo fileModificationInfo = fileModificationService.getFileModificationInfo(new File(tempDir,  filePath));
    watches.put(filePath, new InfoFileModifiedChecker(fileModificationInfo));
  }
View Full Code Here

  public void switchingToANewFileModificationServiceDoesntBreakExistingFileModifiedCheckers() {
    File someDir = new File(tmpDir, "temp");
    someDir.mkdir();
   
    BRJSFileInfo brjsFileInfo = new BRJSFileInfo(someDir, fileModificationService, null, null);
    FileModifiedChecker fileModifiedChecker = new InfoFileModifiedChecker(brjsFileInfo);
   
    assertTrue(fileModifiedChecker.hasChangedSinceLastCheck());
    assertTrue(fileModifiedChecker.hasChangedSinceLastCheck());
   
    brjsFileInfo.reset(fileModificationService);
   
    assertTrue(fileModifiedChecker.hasChangedSinceLastCheck());
    assertTrue(fileModifiedChecker.hasChangedSinceLastCheck());
  }
View Full Code Here

 
  public StandardFileInfo(File file, FileModificationInfo fileModificationInfo, FileInfoAccessor fileInfoAccessor, LoggerFactory loggerFactory) {
    this.fileModificationInfo = fileModificationInfo;
    fileIterator = new StandardFileIterator(fileModificationInfo, file, fileInfoAccessor);
    this.file = file;
    isDirectoryChecker = new InfoFileModifiedChecker(fileModificationInfo);
    existsChecker = new InfoFileModifiedChecker(fileModificationInfo);
   
    try {
      canonicalPath = file.getCanonicalPath();
    } catch (IOException e) {
      loggerFactory.getLogger(this.getClass()).warn("Unable to calculate canonical path for path '%s'.", file.getPath());
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.utility.filemodification.InfoFileModifiedChecker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.