diff --git a/libs/host/Android.mk b/libs/host/Android.mk index 81f2cc5c4..d02e4b274 100644 --- a/libs/host/Android.mk +++ b/libs/host/Android.mk @@ -3,7 +3,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ CopyFile.c \ - Directories.cpp \ pseudolocalize.cpp ifeq ($(HOST_OS),cygwin) diff --git a/libs/host/Directories.cpp b/libs/host/Directories.cpp deleted file mode 100644 index a34f5b7bc..000000000 --- a/libs/host/Directories.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include -#include -#include - -#ifdef HAVE_MS_C_RUNTIME -#include -#endif - -using namespace android; -using namespace std; - -string -parent_dir(const string& path) -{ - return string(String8(path.c_str()).getPathDir().string()); -} - -int -mkdirs(const char* last) -{ - String8 dest; - const char* s = last-1; - int err; - do { - s++; - if (s > last && (*s == '.' || *s == 0)) { - String8 part(last, s-last); - dest.appendPath(part); -#ifdef HAVE_MS_C_RUNTIME - err = _mkdir(dest.string()); -#else - err = mkdir(dest.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); -#endif - if (err != 0) { - return err; - } - last = s+1; - } - } while (*s); - return 0; -}