private function TarArchiveReader::createDir in Backup and Migrate 8.4
Create a directory or return true if it already exists.
Parameters
$directory:
Return value
boolean
1 call to TarArchiveReader::createDir()
- TarArchiveReader::extractAllToDirectory in lib/
backup_migrate_core/ src/ Service/ TarArchiveReader.php
File
- lib/
backup_migrate_core/ src/ Service/ TarArchiveReader.php, line 219
Class
- TarArchiveReader
- Class TarArchiveReader.
Namespace
BackupMigrate\Core\ServiceCode
private function createDir($directory) {
if (@is_dir($directory) || $directory == '') {
return TRUE;
}
$parent = dirname($directory);
if ($parent != $directory && $parent != '' && !$this
->createDir($parent)) {
return FALSE;
}
if (@(!mkdir($directory, 0777))) {
return FALSE;
}
return TRUE;
}