Examples of FileTime


Examples of java.nio.file.attribute.FileTime

            return false;
        try {
            Path extractedFile = appCache.resolve(TIMESTAMP_FILE_NAME);
            if (!Files.exists(extractedFile))
                return false;
            FileTime extractedTime = Files.getLastModifiedTime(extractedFile);
            FileTime jarTime = Files.getLastModifiedTime(jarFile);
            return extractedTime.compareTo(jarTime) >= 0;
        } catch (IOException e) {
            throw new AssertionError(e);
        }
    }
View Full Code Here

Examples of java.nio.file.attribute.FileTime

  }

  private void refresh() throws Exception {
    lock.lock();
    try {
      FileTime lastModifiedTime = Files.getLastModifiedTime(file);
      ByteBuf bytes = IoUtils.read(file);

      if (lastModifiedTime.equals(lastModifiedHolder.get()) && bytes.equals(contentHolder.get())) {
        return;
      }

      T previous = delegateHolder.getAndSet(null);
      if (previous != null) {
View Full Code Here

Examples of java.nio.file.attribute.FileTime

            return;
        }

        String timestamp = null;
        try {
            final FileTime lastMod = Files.getLastModifiedTime(file, NOFOLLOW_LINKS);
            timestamp = DateUtils.format(lastMod);
        } catch (IOException ex) {
            session.replyWithSpace(500, "Failed to execute command.");
            return;
        }
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.