Java Path File Time nio getLastModificationTime(Path path)

Here you can find the source of getLastModificationTime(Path path)

Description

get Last Modification Time

License

Apache License

Declaration

public static FileTime getLastModificationTime(Path path) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.IOException;

import java.nio.file.Files;
import java.nio.file.Path;

import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileTime;

public class Main {
    public static FileTime getLastModificationTime(Path path) throws IOException {
        return Files.readAttributes(path, BasicFileAttributes.class).lastModifiedTime();
    }//from w w  w . j  a  va  2  s  .  c  om
}

Related

  1. addTimestamp(Path base, TimeUnit unit)
  2. awaitLogMessage(String message, long timeout, Path logFilePath)
  3. fileCreationTime(Path path)
  4. getLastAccessTime(Path file)
  5. getLastModifiedTime(Path path)
  6. getLastModifiedTimeInMillis(Path path)
  7. getMTime(Path path)
  8. setFileTimes(String path, Date creationTime, Date lastAccessTime, Date lastModifiedTime)