Here you can find the source of getLastModificationTime(Path path)
public static FileTime getLastModificationTime(Path path) throws IOException
//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 }