From c33c148b6b5c7295f3881df29def2b920cee4c47 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Fri, 1 Feb 2013 18:18:52 +0200 Subject: [PATCH] Add notifications about improvements possible --- classpath/java-io.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classpath/java-io.cpp b/classpath/java-io.cpp index 880d91cf56..74f2ab9617 100644 --- a/classpath/java-io.cpp +++ b/classpath/java-io.cpp @@ -289,7 +289,8 @@ extern "C" JNIEXPORT jlong JNICALL Java_java_io_File_length(JNIEnv* e, jclass, jstring path) { #ifdef PLATFORM_WINDOWS - + // Option: without opening file + // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364946(v=vs.85).aspx string_t chars = getChars(e, path); if(chars) { LARGE_INTEGER fileSize; @@ -575,6 +576,8 @@ Java_java_io_File_lastModified(JNIEnv* e, jclass, jstring path) string_t chars = getChars(e, path); if (chars) { #ifdef PLATFORM_WINDOWS + // Option: without opening file + // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364946(v=vs.85).aspx #if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) HANDLE hFile = CreateFileW (chars, FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);