/** * Create relations * * @return RelationsInterface */ public function createRelations() { $path = $this->_definitionDir . '/' . 'relations.ser'; if ($this->_filesystemDriver->isReadable($path)) { return new \Magento\Framework\ObjectManager\Relations\Compiled($this->_unpack($this->_filesystemDriver->fileGetContents($path))); } else { return new \Magento\Framework\ObjectManager\Relations\Runtime(); } }
/** * Check permissions for reading file or directory * * @param string $path [optional] * @return bool * @throws \Magento\Framework\Exception\FileSystemException */ public function isReadable($path = null) { return $this->driver->isReadable($this->driver->getAbsolutePath($this->path, $path)); }