protected FileStorage::ensureDirectory($directory, $mode = 0777)
Ensures the directory exists, has the right permissions, and a .htaccess.
For compatibility with open_basedir, the requested directory is created using a recursion logic that is based on the relative directory path/tree: It works from the end of the path recursively back towards the root directory, until an existing parent directory is found. From there, the subdirectories are created.
Parameters
string $directory: The directory