summaryrefslogtreecommitdiffstats
path: root/base/file_util_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_util_posix.cc')
-rw-r--r--base/file_util_posix.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 4f1b1ba..65dbfcb 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -300,11 +300,12 @@ bool CreateDirectory(const std::wstring& full_path) {
return true;
}
-bool GetFileSize(const std::wstring& file_path, int64* file_size) {
+bool GetFileInfo(const std::wstring& file_path, FileInfo* results) {
struct stat64 file_info;
if (stat64(WideToUTF8(file_path).c_str(), &file_info) != 0)
return false;
- *file_size = file_info.st_size;
+ results->is_directory = S_ISDIR(file_info.st_mode);
+ results->size = file_info.st_size;
return true;
}