__construct()
__construct()
elFinder driver
upload(Resource $fp, string $dst, string $name, string $tmpname, $hashes = array()) : array|false
Save uploaded file.
On success return array with new file stat and with removed file hash (if existed file was replaced)
Copied from parent and slightly modified to support attachment versioning
Resource | $fp | file pointer |
string | $dst | destination folder hash |
string | $name | file name |
string | $tmpname | file tmp name - required to detect mime type |
$hashes |
_stat(string $path) : array|false
Return stat for given path.
Stat contains following fields:
If file does not exists - returns empty array or false.
string | $path | file path |
_save(resource $fp, string $dir, string $name, array $stat) : boolean|string
Create new file and write into it from file pointer.
Return new file path or false on error.
resource | $fp | file pointer |
string | $dir | target dir path |
string | $name | file name |
array | $stat | file stat (required by some virtual fs) |
create_attachment(\org_openpsa_documents_document_dba $doc, $name, $mimetype, $fp)
\org_openpsa_documents_document_dba | $doc | |
$name | ||
$mimetype | ||
$fp |