March 2019
Intermediate to advanced
580 pages
15h 3m
English
Apart from the staple file_save_data() function, we have a few other ones that can come in handy if we are dealing with managed files. Here's a few of them.
If we want to copy a file from one place to another while making sure a new database record is created, we can use file_copy(). It takes three parameters:
The parameters are the same as for file_save_data().
Apart from the actual copying, this function also invokes hook_file_copy() which allows modules to respond to files being copied.
Very similar to file_copy(), we also have ...
Read now
Unlock full access