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... |
m clean up |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
Wrapper for the standard file_exists function | Wrapper for the standard file_exists function | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 38: | Line 36: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | |||
< | |||
===Examples=== | ===Examples=== | ||
< | <source lang="php"> | ||
JFolder::exists("images/banners"); | |||
</source> | |||
[[Category:Archived pages API16]] | |||
</ | |||
Latest revision as of 14:00, 24 March 2017
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");