API16

API16:JFolder/exists

From Joomla! Documentation

Description

Wrapper for the standard file_exists function

[Edit Descripton]

Template:Description:JFolder/exists

Syntax

static exists($path)
Parameter Name Default Value Description
$path Folder name relative to installation dir

Returns

boolean True if path is a folder

Defined in

libraries/joomla/filesystem/folder.php

Importing

jimport( 'joomla.filesystem.folder' );

Source Body

public static function exists($path)
{
        return is_dir(JPath::clean($path));
}

[Edit See Also] Template:SeeAlso:JFolder/exists

Examples

JFolder::exists("images/banners");