Difference between revisions of "JFile"
From Joomla! Documentation
(Updated to r1448:247ba8d88526) |
m (preparing for archive only) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
=={{JVer|11.1}} JFile== | =={{JVer|11.1}} JFile== | ||
===Description=== | ===Description=== | ||
− | + | ||
− | + | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 14: | Line 12: | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::copy | + | |[[API17:JFile::copy|copy]] |
|Copies a file. | |Copies a file. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::delete | + | |[[API17:JFile::delete|delete]] |
|Delete a file or array of files. | |Delete a file or array of files. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::exists | + | |[[API17:JFile::exists|exists]] |
|Wrapper for the standard file_exists function. | |Wrapper for the standard file_exists function. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::getExt | + | |[[API17:JFile::getExt|getExt]] |
|Gets the extension of a file name. | |Gets the extension of a file name. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::getName | + | |[[API17:JFile::getName|getName]] |
|Returns the name, without any path. | |Returns the name, without any path. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::makeSafe | + | |[[API17:JFile::makeSafe|makeSafe]] |
|Makes file name safe to use. | |Makes file name safe to use. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::move | + | |[[API17:JFile::move|move]] |
|Moves a file. | |Moves a file. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::read | + | |[[API17:JFile::read|read]] |
|Read the contents of a file. | |Read the contents of a file. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::stripExt | + | |[[API17:JFile::stripExt|stripExt]] |
|Strips the last extension off a file name. | |Strips the last extension off a file name. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::upload | + | |[[API17:JFile::upload|upload]] |
|Moves an uploaded file to a destination folder. | |Moves an uploaded file to a destination folder. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JFile::write | + | |[[API17:JFile::write|write]] |
|Write contents to a file. | |Write contents to a file. | ||
|- | |- | ||
Line 63: | Line 61: | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JFile source code''' on [[jplatform:filesystem/file.php|BitBucket]] | * {{JVer|11.1}} '''JFile source code''' on [[jplatform:filesystem/file.php|BitBucket]] | ||
− | * {{JVer|11.1}} Subpackage [[Subpackage Filesystem | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Filesystem|Filesystem]] |
− | * [[JFile|Other versions of JFile]] | + | * [[API17:JFile|Other versions of JFile]] |
− | + | * [[How_to_use_the_filesystem_package|How to use the filesystem package]] | |
− | + | ||
− | + | ||
− | + | ||
===User contributed notes=== | ===User contributed notes=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JFile | category=JFile | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
Line 80: | Line 78: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:01, 24 March 2017
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JFile[edit]
Description[edit]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public static | copy | Copies a file. |
public static | delete | Delete a file or array of files. |
public static | exists | Wrapper for the standard file_exists function. |
public static | getExt | Gets the extension of a file name. |
public static | getName | Returns the name, without any path. |
public static | makeSafe | Makes file name safe to use. |
public static | move | Moves a file. |
public static | read | Read the contents of a file. |
public static | stripExt | Strips the last extension off a file name. |
public static | upload | Moves an uploaded file to a destination folder. |
public static | write | Write contents to a file. |
- Defined in libraries/joomla/filesystem/file.php
Importing[edit]
jimport( 'joomla.filesystem.file' );
See also[edit]
- JFile source code on BitBucket
- Subpackage Filesystem
- Other versions of JFile
- How to use the filesystem package
User contributed notes[edit]
Code Examples[edit]