API16

API16:JFolder/exists

From Joomla! Documentation

Revision as of 14:00, 24 March 2017 by JoomlaWikiBot (talk | contribs) (clean up)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Wrapper for the standard file_exists function


<! removed transcluded page call, red link never existed >

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));
}


<! removed transcluded page call, red link never existed >

Examples

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