Go to the source code of this file.
Namespaces | |
| namespace | KERNEL |
Functions | |
| file_upload_failed ($file) | |
| get_file_upload_errno ($file) | |
| get_file_upload_error_message ($file) | |
| get_file_upload_errstring_from_errno ($errorLevel) | |
| get_file_extension ($fileName) | |
| get_mime_on_ext ($fileName) | |
| claro_send_file ($path, $name= '', $charset=null) | |
| claro_send_stream ($stream, $name, $mimeType=null, $charset=null) | |
| secure_file_path ($path) | |
| claro_readfile ($path, $retbytes=true) | |
| is_download_url_encoded ($str) | |
| download_url_encode ($str) | |
| download_url_decode ($str) | |
| claro_get_file_download_url ($file, $context=null) | |
| replace_dangerous_char ($string, $strict= 'loose') | |
| claro_get_file_download_url | ( | $ | file, | |
| $ | context = null | |||
| ) |
Get the url to download the file at the given file path
| string | $file path to the file | |
| array | $context |
Definition at line 491 of file file.lib.php.
| claro_readfile | ( | $ | path, | |
| $ | retbytes = true | |||
| ) |
Read a file from the file system and echo it
Workaround for the readfile bug in PHP 5.0.4 and with host where PHP readfile is deactivated
| string | $path file path | |
| boolean | $retbytes return file length (default true) |
Definition at line 389 of file file.lib.php.
| claro_send_file | ( | $ | path, | |
| $ | name = '', |
|||
| $ | charset = null | |||
| ) |
Send a file over HTTP
| string | $path file path | |
| string | $name file name to force (optional) |
Definition at line 246 of file file.lib.php.
| claro_send_stream | ( | $ | stream, | |
| $ | name, | |||
| $ | mimeType = null, |
|||
| $ | charset = null | |||
| ) |
Send a stream over HTTP
| string | $stream file stream | |
| string | $name file name to force (optional) | |
| string | $mimeType mime type of the stream if none given, the function will try to guess it from $name | |
| string | $charset character encoding of the strem, if none given the function will use the encoding of the current page |
Definition at line 307 of file file.lib.php.
| download_url_decode | ( | $ | str | ) |
Decode encoded relative file path
| string | $str |
Definition at line 472 of file file.lib.php.
| download_url_encode | ( | $ | str | ) |
WARNING : DO NOT USE IN Url OBJET : ALREADY URLENCODED USE BASE64_ENCODE INSTEAD ! Encode course relative file path to use with backend/download
| string | file relative path |
Definition at line 454 of file file.lib.php.
| file_upload_failed | ( | $ | file | ) |
Definition at line 18 of file file.lib.php.
| get_file_extension | ( | $ | fileName | ) |
Extract the extention of the filename
| string | $fileName name of the file |
Definition at line 87 of file file.lib.php.
| get_file_upload_errno | ( | $ | file | ) |
Definition at line 23 of file file.lib.php.
| get_file_upload_error_message | ( | $ | file | ) |
Definition at line 28 of file file.lib.php.
| get_file_upload_errstring_from_errno | ( | $ | errorLevel | ) |
Definition at line 33 of file file.lib.php.
| get_mime_on_ext | ( | $ | fileName | ) |
Get file MIME type from file name based on extension
| string | $fileName name of the file |
Definition at line 100 of file file.lib.php.
| is_download_url_encoded | ( | $ | str | ) |
Check if a relative path is encoded or not
| string | $str |
Definition at line 441 of file file.lib.php.
| replace_dangerous_char | ( | $ | string, | |
| $ | strict = 'loose' | |||
| ) |
replaces some dangerous character in a file name This function is broken !
| string | $string | |
| string | $strict (optional) removes also scores and simple quotes |
Definition at line 529 of file file.lib.php.
| secure_file_path | ( | $ | path | ) |
Remove /.. ../ from file path
| string | $path file path |
Definition at line 359 of file file.lib.php.
1.6.3