Here you can find the source of getLastModifiedTimeInMillis(Path path)
Parameter | Description |
---|---|
path | the path to the file. |
Parameter | Description |
---|---|
IOException | if something goes wrong. |
public static long getLastModifiedTimeInMillis(Path path) throws IOException
//package com.java2s; import java.io.IOException; import java.nio.file.*; public class Main { /**/* w ww. ja v a 2 s . co m*/ * Returns a file's last modified time in milliseconds. * * @param path the path to the file. * @return the last modified time in milliseconds. * @throws IOException if something goes wrong. */ public static long getLastModifiedTimeInMillis(Path path) throws IOException { return Files.getLastModifiedTime(path).toMillis(); } }