about summary refs log tree commit diff stats
path: root/src/tools/fileutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/fileutils.c')
-rw-r--r--src/tools/fileutils.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/tools/fileutils.c b/src/tools/fileutils.c
index 11dc6905..cfadf3ce 100644
--- a/src/tools/fileutils.c
+++ b/src/tools/fileutils.c
@@ -21,27 +21,6 @@ static const char* bashsign= "#!/bin/bash";
 static const char* shsign  = "#!/bin/sh";
 static const char* bashsign2="#!/usr/bin/env bash";
 
-int FileExist(const char* filename, int flags)
-{
-    struct stat sb;
-    if (stat(filename, &sb) == -1)
-        return 0;
-    if(flags==-1)
-        return 1;
-    // check type of file? should be executable, or folder
-    if(flags&IS_FILE) {
-        if(!S_ISREG(sb.st_mode))
-            return 0;
-    } else if(!S_ISDIR(sb.st_mode))
-            return 0;
-    
-    if(flags&IS_EXECUTABLE) {
-        if((sb.st_mode&S_IXUSR)!=S_IXUSR)
-            return 0;   // nope
-    }
-    return 1;
-}
-
 static char* ResolvePathInner(const char* path, int resolve_symlink) {
     if (resolve_symlink) {
         return box_realpath(path, NULL);
@@ -152,19 +131,6 @@ const char* GetTmpDir() {
     return "/tmp";  // meh...
 }
 
-char* LowerCase(const char* s) {
-    if(!s)
-        return NULL;
-    char* ret = box_calloc(1, strlen(s)+1);
-    size_t i=0;
-    while(*s) {
-        ret[i++] = (*s>='A' && *s<='Z')?(*s-'A'+'a'):(*s);
-        ++s;
-    }
-
-    return ret;
-}
-
 #if defined(RPI) || defined(RK3399) || defined(RK3326)
 void sanitize_mojosetup_gtk_background()
 {