FolderWrapper

Wrapper class for Folder

deprecated
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

package

Joomla CMS

Methods

copy

Helper wrapper method for copy

copy(string src, string dest, string path = '', bool force = false, bool useStreams = false) : bool
deprecated
see 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

boolForce copy.

useStreams

boolOptionally force folder/file overwrites.

Response

boolTrue on success.

create

Helper wrapper method for create

create(string path = '', int mode = 493) : bool
deprecated
see 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

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

Response

boolTrue if successful.

delete

Helper wrapper method for delete

delete(string path) : bool
deprecated
see 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

boolTrue on success.

exists

Helper wrapper method for exists

exists(string path) : bool
deprecated
see Folder::exists()
since

3.4

deprecated

4.0 Use \Joomla\CMS\Filesystem\Folder instead

Arguments

path

stringFolder name relative to installation dir.

Response

boolTrue if path is a folder.

files

Helper wrapper method for files

files(string path, string filter = '.', mixed recurse = false, bool full = false, array exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array excludefilter = array('^\..*', '.*~'), bool naturalSort = false) : array
deprecated
see 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

boolTrue 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

boolFalse 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, bool full = false, array exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array excludefilter = array('^\..*')) : array
deprecated
see 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

boolTrue 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, int maxLevel = 3, int level, int parent) : array
deprecated
see 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

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

level

intThe current level, optional.

parent

intUnique 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 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 = '', bool useStreams = false) : mixed
deprecated
see 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.

useStreams

boolOptionally use streams.

Response

mixedError message on false or boolean true on success.