Mercurial Hosting > luan
diff src/goodjava/io/IoUtils.java @ 1548:736ec76bbf42
lucene log work
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 27 Sep 2020 22:07:18 -0600 |
parents | f24a9ba7551e |
children | 08177ced7fa0 |
line wrap: on
line diff
--- a/src/goodjava/io/IoUtils.java Thu Sep 24 15:33:56 2020 -0600 +++ b/src/goodjava/io/IoUtils.java Sun Sep 27 22:07:18 2020 -0600 @@ -9,6 +9,7 @@ import java.io.StringWriter; import java.io.IOException; import java.nio.file.Files; +import java.nio.file.attribute.FileTime; import java.security.Security; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.SSLServerSocketFactory; @@ -54,6 +55,10 @@ Files.createSymbolicLink( link.toPath(), existing.toPath() ); } + public static long getCreationTime(File f) throws IOException { + return ((FileTime)Files.getAttribute(f.toPath(),"creationTime")).toMillis(); + } + public static void copyAll(InputStream in,OutputStream out) throws IOException {