API16

JFolder/exists: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
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


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JFolder/exists|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JFolder/exists}}
 
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 38: Line 36:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JFolder/exists|Edit See Also]]<nowiki>]</nowiki>
<! removed transcluded page call, red link never existed >
</span>
{{SeeAlso:JFolder/exists}}


===Examples===
===Examples===
<CodeExamplesForm />
<source lang="php">
<dpl>
JFolder::exists("images/banners");
noresultsheader=\n
</source>
category=exists
[[Category:Archived pages API16]]
category=JFolder
category=CodeExample
category=MethodExample
include=*
format= ,,,
</dpl>

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