summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;