Change record status: 
Project: 
Introduced in branch: 
8.2.x
Introduced in version: 
8.2.0
Description: 

file_unmanaged_copy() and file_unmanage_move() will create folders if they do not exist.

file_unmanaged_copy

$uri = 'public://myfile.txt';
$file = file_unmanaged_copy($uri, 'public://sub-folder/myfile.txt');

Before $file would be false if the sub-folder did not exist and the file wouldn't be copied. But now it returns the new $uri and the file is successfully copied and sub-folder directory is created.

file_unmanage_move

$uri = 'public://myfile.txt';
$file = file_unmanage_move($uri, 'public://sub-folder/myfile.txt');

Before $file would be false if sub-folder did not and the file wouldn't be copied. But now it returns the new $uri and the file is successfully copied and sub-folder directory is created.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done