is_command() 대체

This commit is contained in:
conory 2019-10-09 23:28:23 +09:00
parent 9a78f0f0a0
commit 77122a32b2
6 changed files with 18 additions and 25 deletions

View file

@ -143,6 +143,18 @@ class Storage
return @self::exists($path) && @is_writable($path);
}
/**
* Check if the given path is executable.
*
* @param string $path
* @return bool
*/
public static function isExecutable($path)
{
$path = rtrim($path, '/\\');
return @self::exists($path) && @is_executable($path);
}
/**
* Get the size of a file.
*