Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
win: get file size with file stat
Browse files Browse the repository at this point in the history
  • Loading branch information
couzteau committed Oct 7, 2013
1 parent 00f2bb5 commit 1e4f302
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion appshell/appshell_extensions_win.cpp
Expand Up @@ -654,7 +654,7 @@ int32 Rename(ExtensionString oldName, ExtensionString newName)
return NO_ERROR;
}

int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& isDir)
int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& isDir, uint32& size)
{
DWORD dwAttr = GetFileAttributes(filename.c_str());

Expand All @@ -671,6 +671,11 @@ int32 GetFileModificationTime(ExtensionString filename, uint32& modtime, bool& i

modtime = FiletimeToTime(fad.ftLastWriteTime);

LARGE_INTEGER size_tmp;
size_tmp.HighPart = fad.nFileSizeHigh;
size_tmp.LowPart = fad.nFileSizeLow;
size = size_tmp.QuadPart;

return NO_ERROR;
}

Expand Down

0 comments on commit 1e4f302

Please sign in to comment.