53 if (!file_exists($directory)) {
57 if (!is_dir($directory)) {
62 if (!$handle = opendir($directory)) {
67 while (($file = readdir($handle)) !==
false) {
68 if (in_array($file, [
'.',
'..'])) {
72 $path =
"$directory/$file";
87 if ($leave_base_directory) {
92 return rmdir($directory);
138 'guid' => $entity->guid,
$params
Saves global plugin settings.
This class represents a physical file (by default in the system temp directory).
elgg_get_download_url(\ElggFile $file, $use_cookie=true, $expires= '+2 hours')
Returns file's download URL.
elgg_get_embed_url(\ElggEntity $entity, $size)
Returns a URL suitable for embedding entity's icon in a text editor.
elgg_get_uploaded_files($input_name)
Returns an array of uploaded file objects regardless of upload status/errors.
elgg_get_inline_url(\ElggFile $file, $use_cookie=false, $expires= '')
Returns file's URL for inline display Suitable for displaying cacheable resources, such as user avatars.
elgg_get_uploaded_file($input_name, $check_for_validity=true)
Returns a single valid uploaded file object.
elgg_get_temp_file()
Returns a ElggTempFile which can handle writing/reading of data to a temporary file location...
elgg_generate_url($name, array $parameters=[])
Generate a URL for named route.
getDownloadURL($use_cookie=true, $expires= '+2 hours')
Returns file's download URL.
elgg_delete_directory(string $directory, bool $leave_base_directory=false)
Delete a directory and all its contents.
getInlineURL($use_cookie=false, $expires= '')
Returns file's URL for inline display Suitable for displaying cacheable resources, such as user avatars.
elgg_save_resized_image($source, $destination=null, array $params=[])
Crops and resizes an image.
_elgg_services()
Get the global service provider.