Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
getFile (string $path='/') | |
getFiles (string $path='/') | |
getResource (string $path) | |
createFolder (string $name, string $path) | |
createFile (string $name, string $path, $data) | |
updateFile (string $name, string $path, $data) | |
delete (string $path) | |
move (string $sourcePath, string $destinationPath, bool $force=false) | |
copy (string $sourcePath, string $destinationPath, bool $force=false) | |
getUrl (string $path) | |
getAdapterName () | |
search (string $path, string $needle, bool $recursive=false) | |
Media file adapter interface.
copy | ( | string | $sourcePath, |
string | $destinationPath, | ||
bool | $force = false |
||
) |
Copies a file or folder from source to destination.
It returns the new destination path. This allows the implementation classes to normalise the file name.
string | $sourcePath | The source path |
string | $destinationPath | The destination path |
bool | $force | Force to overwrite |
Implémenté dans LocalAdapter.
createFile | ( | string | $name, |
string | $path, | ||
$data | |||
) |
Creates a file with the given name in the given path with the data.
It returns the new file name. This allows the implementation classes to normalise the file name.
string | $name | The name |
string | $path | The folder |
string | $data | The data |
Implémenté dans LocalAdapter.
createFolder | ( | string | $name, |
string | $path | ||
) |
Creates a folder with the given name in the given path.
It returns the new folder name. This allows the implementation classes to normalise the file name.
string | $name | The name |
string | $path | The folder |
Implémenté dans LocalAdapter.
delete | ( | string | $path | ) |
Deletes the folder or file of the given path.
string | $path | The path to the file or folder |
Implémenté dans LocalAdapter.
getAdapterName | ( | ) |
Returns the name of the adapter. It will be shown in the Media Manager
Implémenté dans LocalAdapter.
getFile | ( | string | $path = '/' | ) |
Returns the requested file or folder. The returned object has the following properties available:
If the path doesn't exist a FileNotFoundException is thrown.
string | $path | The path to the file or folder |
Implémenté dans LocalAdapter.
getFiles | ( | string | $path = '/' | ) |
Returns the folders and files for the given path. The returned objects have the following properties available:
If the path doesn't exist a FileNotFoundException is thrown.
string | $path | The folder |
Implémenté dans LocalAdapter.
getResource | ( | string | $path | ) |
Returns a resource for the given path.
string | $path | The path |
Implémenté dans LocalAdapter.
getUrl | ( | string | $path | ) |
Returns a public url for the given path. This function can be used by the cloud adapter to publish the media file and create a permanent publicly accessible url.
string | $path | The path to file |
Implémenté dans LocalAdapter.
move | ( | string | $sourcePath, |
string | $destinationPath, | ||
bool | $force = false |
||
) |
Moves a file or folder from source to destination.
It returns the new destination path. This allows the implementation classes to normalise the file name.
string | $sourcePath | The source path |
string | $destinationPath | The destination path |
bool | $force | Force to overwrite |
Implémenté dans LocalAdapter.
search | ( | string | $path, |
string | $needle, | ||
bool | $recursive = false |
||
) |
Search for a pattern in a given path
string | $path | The base path for the search |
string | $needle | The path to file |
bool | $recursive | Do a recursive search |
Implémenté dans LocalAdapter.
updateFile | ( | string | $name, |
string | $path, | ||
$data | |||
) |
Updates the file with the given name in the given path with the data.
string | $name | The name |
string | $path | The folder |
string | $data | The data |
Implémenté dans LocalAdapter.