natFileWin32.cc (attr): Use FindFirstFile( ) instead of GetFileAttributesEx( ) to find file length and...
2002-10-23 Ranjit Mathew <rmathew@hotmail.com> * java/io/natFileWin32.cc (attr): Use FindFirstFile( ) instead of GetFileAttributesEx( ) to find file length and modification times, as the latter is not present on Windows 95. From-SVN: r58466
This commit is contained in:
parent
e6f052b7e6
commit
963f08a97f
2 changed files with 12 additions and 3 deletions
|
@ -83,10 +83,13 @@ java::io::File::attr (jint query)
|
|||
|
||||
JvAssert (query == MODIFIED || query == LENGTH);
|
||||
|
||||
WIN32_FILE_ATTRIBUTE_DATA info;
|
||||
if (! GetFileAttributesEx(buf, GetFileExInfoStandard, &info))
|
||||
WIN32_FIND_DATA info;
|
||||
HANDLE sHandle;
|
||||
if ( ( sHandle = FindFirstFile( buf, &info)) == INVALID_HANDLE_VALUE)
|
||||
return 0;
|
||||
|
||||
|
||||
FindClose( sHandle);
|
||||
|
||||
if (query == LENGTH)
|
||||
return ((long long)info.nFileSizeHigh) << 32 | (unsigned long long)info.nFileSizeLow;
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue