コード例 #1
0
ファイル: Io.php プロジェクト: IlyaGluschenko/test001
 /**
  * @param string $directory
  * @return bool
  */
 private function _makeDirectory($directory)
 {
     if ($this->filesystemDriver->isWritable($directory)) {
         return true;
     }
     try {
         if (!$this->filesystemDriver->isDirectory($directory)) {
             $this->filesystemDriver->createDirectory($directory, DriverInterface::WRITEABLE_DIRECTORY_MODE);
         }
         return true;
     } catch (FileSystemException $e) {
         return false;
     }
 }
コード例 #2
0
ファイル: Io.php プロジェクト: opexsw/magento2
 /**
  * @param string $directory
  * @return bool
  */
 private function _makeDirectory($directory)
 {
     if ($this->filesystemDriver->isWritable($directory)) {
         return true;
     }
     try {
         if (!$this->filesystemDriver->isDirectory($directory)) {
             $this->filesystemDriver->createDirectory($directory, self::DIRECTORY_PERMISSION);
         }
         return true;
     } catch (FileSystemException $e) {
         return false;
     }
 }