summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-12-02 03:03:45 +0100
committerDees Troy <dees_troy@teamw.in>2013-12-19 19:02:44 +0100
commit34684ff3138ca32e62754cfca2a0b2116aa9e32d (patch)
tree4166103c4a2d2f36fde45ff3d4b62515a8051137 /twrp-functions.cpp
parentMerge "Add support for persistent variables in theme's <variables> section" into android-4.4 (diff)
downloadandroid_bootable_recovery-34684ff3138ca32e62754cfca2a0b2116aa9e32d.tar
android_bootable_recovery-34684ff3138ca32e62754cfca2a0b2116aa9e32d.tar.gz
android_bootable_recovery-34684ff3138ca32e62754cfca2a0b2116aa9e32d.tar.bz2
android_bootable_recovery-34684ff3138ca32e62754cfca2a0b2116aa9e32d.tar.lz
android_bootable_recovery-34684ff3138ca32e62754cfca2a0b2116aa9e32d.tar.xz
android_bootable_recovery-34684ff3138ca32e62754cfca2a0b2116aa9e32d.tar.zst
android_bootable_recovery-34684ff3138ca32e62754cfca2a0b2116aa9e32d.zip
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r--twrp-functions.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index f0c8cd430..e172f3da0 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -206,39 +206,6 @@ int TWFunc::Recursive_Mkdir(string Path) {
return true;
}
-unsigned long long TWFunc::Get_Folder_Size(const string& Path, bool Display_Error) {
- DIR* d;
- struct dirent* de;
- struct stat st;
- unsigned long long dusize = 0;
- unsigned long long dutemp = 0;
-
- d = opendir(Path.c_str());
- if (d == NULL)
- {
- LOGERR("error opening '%s'\n", Path.c_str());
- LOGERR("error: %s\n", strerror(errno));
- return 0;
- }
-
- while ((de = readdir(d)) != NULL)
- {
- if (de->d_type == DT_DIR && strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0 && strcmp(de->d_name, "lost+found") != 0)
- {
- dutemp = Get_Folder_Size((Path + "/" + de->d_name), Display_Error);
- dusize += dutemp;
- dutemp = 0;
- }
- else if (de->d_type == DT_REG)
- {
- stat((Path + "/" + de->d_name).c_str(), &st);
- dusize += (unsigned long long)(st.st_size);
- }
- }
- closedir(d);
- return dusize;
-}
-
bool TWFunc::Path_Exists(string Path) {
// Check to see if the Path exists
struct stat st;