src/Bandolier/Validate/WritableLocation.php
protected function isADirectory()
    {
        if (file_exists($this->path) && !is_dir($this->path)) {
            throw new  LocationIsADirectory(
                $this->getPath() .' already exists but is not a directory!',
                self::WRITABLE_IS_NOT_A_DIR_ERROR
            );
        }
        return true;
    }
protected function isADirectory()
    {
        if (file_exists($this->path) && !is_dir($this->path)) {
            throw new  LocationIsADirectory(
                $this->getPath() .' already exists but is not a directory!',
                self::WRITABLE_IS_NOT_A_DIR_ERROR
            );
        }
        return true;
    }
protected function isADirectory ( ) { if ( file_exists ( $ this -> path ) && ! is_dir ( $ this -> path ) ) { throw new LocationIsADirectory ( $ this -> getPath ( ) . ' already exists but is not a directory!' , self :: WRITABLE_IS_NOT_A_DIR_ERROR ) ; } return true ; }
Check if path is a directory

@return bool
@throws LocationIsADirectory
Check if path is a directory