aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorRobin <robin@Amaya.(none)>2010-05-22 22:26:25 +0200
committerRobin <robin@Amaya.(none)>2010-05-22 22:26:25 +0200
commit5468a8afa15d9587181739bf60fe1baa0e685873 (patch)
treed81690fbb8e77f6c7067b152a281c64664c0aa1d /inc
parent78ce03491e0045eaedd7b80b694520f63ba96474 (diff)
downloadnextcloud-server-5468a8afa15d9587181739bf60fe1baa0e685873.tar.gz
nextcloud-server-5468a8afa15d9587181739bf60fe1baa0e685873.zip
remove old unused _can_excecute
Diffstat (limited to 'inc')
-rwxr-xr-xinc/HTTP/WebDAV/Server/Filesystem.php44
1 files changed, 0 insertions, 44 deletions
diff --git a/inc/HTTP/WebDAV/Server/Filesystem.php b/inc/HTTP/WebDAV/Server/Filesystem.php
index 2ad0041cc53..000831f6fef 100755
--- a/inc/HTTP/WebDAV/Server/Filesystem.php
+++ b/inc/HTTP/WebDAV/Server/Filesystem.php
@@ -190,50 +190,6 @@
}
return $info;
}
-
- /**
- * detect if a given program is found in the search PATH
- *
- * helper function used by _mimetype() to detect if the
- * external 'file' utility is available
- *
- * @param string program name
- * @param string optional search path, defaults to $PATH
- * @return bool true if executable program found in path
- */
- function _can_execute($name, $path = false)
- {
- // path defaults to PATH from environment if not set
- if ($path === false) {
- $path = getenv("PATH");
- }
-
- // check method depends on operating system
- if (!strncmp(PHP_OS, "WIN", 3)) {
- // on Windows an appropriate COM or EXE file needs to exist
- $exts = array(".exe", ".com");
- $check_fn = "file_exists";
- } else {
- // anywhere else we look for an executable file of that name
- $exts = array("");
- $check_fn = "is_executable";
- }
-
- // now check the directories in the path for the program
- foreach (explode(PATH_SEPARATOR, $path) as $dir) {
- // skip invalid path entries
- if (!file_exists($dir)) continue;
- if (!is_dir($dir)) continue;
-
- // and now look for the file
- foreach ($exts as $ext) {
- if ($check_fn("$dir/$name".$ext)) return true;
- }
- }
-
- return false;
- }
-
/**
* try to detect the mime type of a file