src/AbstractCmdTask.php
public static function checkPath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(sprintf("String expected as path, got '%s' instead", gettype($path)));
        }
        if (!file_exists($path)) {
            throw new InvalidArgumentException(sprintf("'%s' does not exist", $path));
        }

        if (!is_dir($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not a directory", $path));
        }

        if (!is_readable($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not readable", $path));
        }

        return true;
    }
public static function checkPath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(sprintf("String expected as path, got '%s' instead", gettype($path)));
        }
        if (!file_exists($path)) {
            throw new InvalidArgumentException(sprintf("'%s' does not exist", $path));
        }

        if (!is_dir($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not a directory", $path));
        }

        if (!is_readable($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not readable", $path));
        }

        return true;
    }
public static function checkPath ( $ path ) { if ( ! is_string ( $ path ) ) { throw new InvalidArgumentException ( sprintf ( "String expected as path, got '%s' instead" , gettype ( $ path ) ) ) ; } if ( ! file_exists ( $ path ) ) { throw new InvalidArgumentException ( sprintf ( "'%s' does not exist" , $ path ) ) ; } if ( ! is_dir ( $ path ) ) { throw new InvalidArgumentException ( sprintf ( "'%s' is not a directory" , $ path ) ) ; } if ( ! is_readable ( $ path ) ) { throw new InvalidArgumentException ( sprintf ( "'%s' is not readable" , $ path ) ) ; } return true ; }
Check if path is readable
Check if path is readable