JFolder/exists: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Wrapper for the standard file_exists function
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowi... |
Ravenheart (talk | contribs) |
||
| Line 44: | Line 44: | ||
===Examples=== | ===Examples=== | ||
< | <source lang="php"> | ||
JFolder::exists("images/banners"); | |||
</source> | |||
</ | |||
Revision as of 16:17, 30 September 2011
Description
Wrapper for the standard file_exists function
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");