FileWrapper
Wrapper class for File
| since |
3.4 |
|---|---|
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
| package |
Joomla CMS |
Methods
copy
Helper wrapper method for copy
copy(string src, string dest, string path = null, bool useStreams = false) : bool
| see | File::copy() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- src
stringThe path to the source file.- dest
stringThe path to the destination file.- path
stringAn optional base path to prefix to the file names.- useStreams
boolTrue to use streams.
Response
boolTrue on success.
delete
Helper wrapper method for delete
delete(mixed file) : bool
| see | File::delete() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- file
mixedThe file name or an array of file names
Response
boolTrue on success.
exists
Helper wrapper method for exists
exists(string file) : bool
| see | File::exists() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- file
stringFile path.
Response
boolTrue if path is a file.
getExt
Helper wrapper method for getExt
getExt(string file) : string
| see | File::getExt() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- file
stringThe file name.
Response
stringThe file extension.
getName
Helper wrapper method for getName
getName(string file) : string
| see | File::getName() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- file
stringFile path.
Response
stringfilename.
makeSafe
Helper wrapper method for makeSafe
makeSafe(string file) : string
| see | File::makeSafe() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- file
stringThe name of the file [not full path].
Response
stringThe sanitised string.
move
Helper wrapper method for move
move(string src, string dest, string path = '', bool useStreams = false) : bool
| see | File::move() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- src
stringThe path to the source file.- dest
stringThe path to the destination file.- path
stringAn optional base path to prefix to the file names.- useStreams
boolTrue to use streams.
Response
boolTrue on success.
read
Helper wrapper method for read
read(string filename, bool incpath = false, int amount, int chunksize = 8192, int offset) : mixed
| see | File::read() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- filename
stringThe full file path.- incpath
boolUse include path.- amount
intAmount of file to read.- chunksize
intSize of chunks to read.- offset
intOffset of the file.
Response
mixedReturns file contents or boolean False if failed.
stripExt
Helper wrapper method for stripExt
stripExt(string file) : string
| see | File::stripExt() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- file
stringThe file name.
Response
stringThe file name without the extension.
upload
Helper wrapper method for upload
upload(string src, string dest, bool useStreams = false) : bool
| see | File::upload() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- src
stringThe name of the php (temporary) uploaded file.- dest
stringThe path (including filename) to move the uploaded file to.- useStreams
boolTrue to use streams.
Response
boolTrue on success.
write
Helper wrapper method for write
write(string file, string &buffer, bool useStreams = false) : bool
| see | File::write() |
|---|---|
| since |
3.4 |
| deprecated |
4.0 Use \Joomla\CMS\Filesystem\File instead |
Arguments
- file
stringThe full file path.- buffer
stringThe buffer to write.- useStreams
boolUse streams.
Response
boolTrue on success.