$error
$error
In case of the error, will contain error code.
Public interface:
writeUploadTo(string $file_path, mixed $file_data_name = false, mixed $mode = 'wb') : string
Writes either a multipart/form-data message or a binary stream to the specified file.
| string | $file_path | The path to write the file to |
| mixed | $file_data_name | |
| mixed | $mode |
In case of error generates exception with the corresponding code
Path to the target file
writeToFile(array|string $source_paths, string $target_path, mixed $mode = 'wb') : string
Write source or set of sources to the specified target. Depending on the mode sources will either overwrite the content in the target or will be appended to the target.
| array|string | $source_paths | |
| string | $target_path | |
| mixed | $mode |
Path to the written target file
writeChunksToFile(string $chunk_dir, string $target_path) : string
Combine chunks from the specified folder into the single file.
| string | $chunk_dir | Directory containing the chunks |
| string | $target_path | The file to write the chunks to |
In case of error generates exception with the corresponding code
File path containing combined chunks
sanitizeFileName(string $filename) : string
Sanitizes a filename replacing whitespace with dashes
Removes special characters that are illegal in filenames on certain operating systems and special characters requiring special escaping to manipulate at the command line. Replaces spaces and consecutive dashes with a single dash. Trim period, dash and underscore from beginning and end of filename.
| string | $filename | The filename to be sanitized |
The sanitized filename