| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
FileSystem |
JFolder |
exists |
exists() |
Never | Work in Progress |
This is a wrapper for the standard PHP file_exists function. It returns true if the folder exists, false otherwise.
boolean exists ( $path )
| $path | string | is a string containing a folder name relative to the base folder. |
Example
jimport( 'joomla.filesystem.folder' ); if (JFolder::exists( 'test1' )) { echo "Folder exists!"; } else { echo "Folder does not exist!"; }
might produce:
Results
Folder exists!