Box\Spout\Common\Helper\FileSystemHelper::createFolder PHP Method

createFolder() public method

Creates an empty folder with the given name under the given parent folder.
public createFolder ( string $parentFolderPath, string $folderName ) : string
$parentFolderPath string The parent folder path under which the folder is going to be created
$folderName string The name of the folder to create
return string Path of the created folder
    public function createFolder($parentFolderPath, $folderName)
    {
        $this->throwIfOperationNotInBaseFolder($parentFolderPath);
        $folderPath = $parentFolderPath . '/' . $folderName;
        $wasCreationSuccessful = mkdir($folderPath, 0777, true);
        if (!$wasCreationSuccessful) {
            throw new IOException("Unable to create folder: {$folderPath}");
        }
        return $folderPath;
    }