diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-06-05 15:43:30 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-05 09:43:30 +0200 |
| commit | e9242b884980187cb2090ae6a589e74da9613311 (patch) | |
| tree | a1a5d294f133e63428a4cbef3e686e70dcdbb1ec /src/tools/fileutils.c | |
| parent | c5755c8241177c2cc7d95709fa0f0ac42111d141 (diff) | |
| download | box64-e9242b884980187cb2090ae6a589e74da9613311.tar.gz box64-e9242b884980187cb2090ae6a589e74da9613311.zip | |
[WOW64] Added rcfile support (#2708)
* [WOW64] Fixed more compilation warnings * [WOW64] Messing around with file APIs * [WOW64] Added rcfile support * [DOCS] Update rcfile usage on WowBox64
Diffstat (limited to 'src/tools/fileutils.c')
| -rw-r--r-- | src/tools/fileutils.c | 34 |
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() { |