FolderWrapper

Wrapper class for Folder

deprecated
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Methods

copy

Helper wrapper method for copy

copy(string $src, string $dest, string $path = '', boolean $force = false, boolean $use_streams = false) : boolean
deprecated
see \Joomla\CMS\Filesystem\Folder::copy()
since

3.4

throws

\Joomla\CMS\Filesystem\Wrapper\RuntimeException

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$src

stringThe path to the source folder.

$dest

stringThe path to the destination folder.

$path

stringAn optional base path to prefix to the file names.

$force

booleanForce copy.

$use_streams

booleanOptionally force folder/file overwrites.

Response

booleanTrue on success.

create

Helper wrapper method for create

create(string $path = '', integer $mode = 493) : boolean
deprecated
see \Joomla\CMS\Filesystem\Folder::create()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$path

stringA path to create from the base path.

$mode

integerDirectory permissions to set for folders created. 0755 by default.

Response

booleanTrue if successful.

delete

Helper wrapper method for delete

delete(string $path) : boolean
deprecated
see \Joomla\CMS\Filesystem\Folder::delete()
since

3.4

throws

\Joomla\CMS\Filesystem\Wrapper\UnexpectedValueException

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$path

stringThe path to the folder to delete.

Response

booleanTrue on success.

exists

Helper wrapper method for exists

exists(string $path) : boolean
deprecated
see \Joomla\CMS\Filesystem\Folder::exists()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$path

stringFolder name relative to installation dir.

Response

booleanTrue if path is a folder.

files

Helper wrapper method for files

files(string $path, string $filter = '.', mixed $recurse = false, boolean $full = false, array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array $excludefilter = array('^\..*', '.*~'), boolean $naturalSort = false) : array
deprecated
see \Joomla\CMS\Filesystem\Folder::files()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$path

stringThe path of the folder to read.

$filter

stringA filter for file names.

$recurse

mixedTrue to recursively search into sub-folders, or an integer to specify the maximum depth.

$full

booleanTrue to return the full path to the file.

$exclude

arrayArray with names of files which should not be shown in the result.

$excludefilter

arrayArray of filter to exclude.

$naturalSort

booleanFalse for asort, true for natsort.

Response

arrayFiles in the given folder.

folders

Helper wrapper method for folders

folders(string $path, string $filter = '.', mixed $recurse = false, boolean $full = false, array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array $excludefilter = array('^\..*')) : array
deprecated
see \Joomla\CMS\Filesystem\Folder::folders()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$path

stringThe path of the folder to read.

$filter

stringA filter for folder names.

$recurse

mixedTrue to recursively search into sub-folders, or an integer to specify the maximum depth.

$full

booleanTrue to return the full path to the folders.

$exclude

arrayArray with names of folders which should not be shown in the result.

$excludefilter

arrayArray with regular expressions matching folders which should not be shown in the result.

Response

arrayFolders in the given folder.

listFolderTree

Helper wrapper method for listFolderTree

listFolderTree(string $path, string $filter, integer $maxLevel = 3, integer $level, integer $parent) : array
deprecated
see \Joomla\CMS\Filesystem\Folder::listFolderTree()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$path

stringThe path of the folder to read.

$filter

stringA filter for folder names.

$maxLevel

integerThe maximum number of levels to recursively read, defaults to three.

$level

integerThe current level, optional.

$parent

integerUnique identifier of the parent folder, if any.

Response

arrayFolders in the given folder.

makeSafe

Helper wrapper method for makeSafe

makeSafe(string $path) : string
deprecated
see \Joomla\CMS\Filesystem\Folder::makeSafe()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$path

stringThe full path to sanitise.

Response

stringThe sanitised string

move

Helper wrapper method for move

move(string $src, string $dest, string $path = '', boolean $use_streams = false) : mixed
deprecated
see \Joomla\CMS\Filesystem\Folder::move()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

$src

stringThe path to the source folder.

$dest

stringThe path to the destination folder.

$path

stringAn optional base path to prefix to the file names.

$use_streams

booleanOptionally use streams.

Response

mixedError message on false or boolean true on success.