Package org.eclipse.jgit.util

Examples of org.eclipse.jgit.util.FS.lastModified()


    FS fs = FS.DETECTED;
    if (lastFile != null && !fs.exists(lastFile))
      throw new FileNotFoundException(lastFile.getPath());
    File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
    try {
      long startTime = (lastFile == null) ? fs.lastModified(tmp) : fs
          .lastModified(lastFile);
      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 5;
View Full Code Here


    FS fs = FS.DETECTED;
    if (lastFile != null && !fs.exists(lastFile))
      throw new FileNotFoundException(lastFile.getPath());
    File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
    try {
      long startTime = (lastFile == null) ? fs.lastModified(tmp) : fs
          .lastModified(lastFile);
      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 5;
View Full Code Here

      throw new FileNotFoundException(lastFile.getPath());
    File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
    try {
      long startTime = (lastFile == null) ? fs.lastModified(tmp) : fs
          .lastModified(lastFile);
      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 5;
        fs.setLastModified(tmp, System.currentTimeMillis());
        actTime = fs.lastModified(tmp);
View Full Code Here

      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 5;
        fs.setLastModified(tmp, System.currentTimeMillis());
        actTime = fs.lastModified(tmp);
      }
      return actTime;
    } finally {
      FileUtils.delete(tmp);
    }
View Full Code Here

        && opt.getSymLinks() == SymLinks.TRUE) {
      byte[] bytes = ol.getBytes();
      String target = RawParseUtils.decode(bytes);
      fs.createSymLink(f, target);
      entry.setLength(bytes.length);
      entry.setLastModified(fs.lastModified(f));
    } else {
      File tmpFile = File.createTempFile(
          "._" + f.getName(), null, parentDir); //$NON-NLS-1$
      FileOutputStream rawChannel = new FileOutputStream(tmpFile);
      OutputStream channel;
View Full Code Here

    FS fs = FS.DETECTED;
    if (lastFile != null && !fs.exists(lastFile))
      throw new FileNotFoundException(lastFile.getPath());
    File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
    try {
      long startTime = (lastFile == null) ? fs.lastModified(tmp) : fs
          .lastModified(lastFile);
      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 2;
View Full Code Here

    FS fs = FS.DETECTED;
    if (lastFile != null && !fs.exists(lastFile))
      throw new FileNotFoundException(lastFile.getPath());
    File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
    try {
      long startTime = (lastFile == null) ? fs.lastModified(tmp) : fs
          .lastModified(lastFile);
      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 2;
View Full Code Here

      throw new FileNotFoundException(lastFile.getPath());
    File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
    try {
      long startTime = (lastFile == null) ? fs.lastModified(tmp) : fs
          .lastModified(lastFile);
      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 2;
        FileOutputStream fos = new FileOutputStream(tmp);
        fos.close();
View Full Code Here

      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 2;
        FileOutputStream fos = new FileOutputStream(tmp);
        fos.close();
        actTime = fs.lastModified(tmp);
      }
      return actTime;
    } finally {
      FileUtils.delete(tmp);
    }
View Full Code Here

    File target = new File(trash, "å");
    fs.createSymLink(link, "å");
    assertTrue(fs.exists(link));
    String targetName = fs.readSymLink(link);
    assertEquals("å", targetName);
    assertTrue(fs.lastModified(link) > 0);
    assertTrue(fs.exists(link));
    assertFalse(fs.canExecute(link));
    assertEquals(2, fs.length(link));
    assertFalse(fs.exists(target));
    assertFalse(fs.isFile(target));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.