diff options
author | Dees_Troy <dees_troy@teamw.in> | 2012-09-26 15:49:14 +0200 |
---|---|---|
committer | Dees_Troy <dees_troy@teamw.in> | 2012-09-26 15:50:10 +0200 |
commit | 7c2dec8020f592fac48fea370e06f6bfd00e2798 (patch) | |
tree | ccbc8bcb44eaf4c8847d4bfcbca344609261f19b /twrp-functions.cpp | |
parent | Convert makelist to C++ (diff) | |
download | android_bootable_recovery-7c2dec8020f592fac48fea370e06f6bfd00e2798.tar android_bootable_recovery-7c2dec8020f592fac48fea370e06f6bfd00e2798.tar.gz android_bootable_recovery-7c2dec8020f592fac48fea370e06f6bfd00e2798.tar.bz2 android_bootable_recovery-7c2dec8020f592fac48fea370e06f6bfd00e2798.tar.lz android_bootable_recovery-7c2dec8020f592fac48fea370e06f6bfd00e2798.tar.xz android_bootable_recovery-7c2dec8020f592fac48fea370e06f6bfd00e2798.tar.zst android_bootable_recovery-7c2dec8020f592fac48fea370e06f6bfd00e2798.zip |
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r-- | twrp-functions.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp index a681de280..066e6e57b 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -221,9 +221,9 @@ unsigned long long TWFunc::Get_Folder_Size(string Path, bool Display_Error) { bool TWFunc::Path_Exists(string Path) { // Check to see if the Path exists - struct statfs st; + struct stat st; - if (statfs(Path.c_str(), &st) != 0) + if (stat(Path.c_str(), &st) != 0) return false; else return true; @@ -249,4 +249,12 @@ void TWFunc::GUI_Operation_Text(string Read_Value, string Partition_Name, string DataManager::SetValue("tw_operation", Display_Text); DataManager::SetValue("tw_partition", Partition_Name); +} + +unsigned long TWFunc::Get_File_Size(string Path) { + struct stat st; + + if (stat(Path.c_str(), &st) != 0) + return 0; + return st.st_size; }
\ No newline at end of file |