/** * Constructor * @param \PerrysLambda\IO\DirectoryConverter $dirconv */ public function __construct(DirectoryConverter $dirconv) { $dirconv->setItemtype($this->getFileClassType()); parent::__construct($dirconv); }
/** * Open new Directory instance * @return \PerrysLambda\IO\Directory */ public function openDir() { if (!$this->isDir()) { throw new IOException("Not a directory"); } $dirconv = DirectoryConverter::fromPath($this); $dirconv->setRoot($this->getRootDirectory()); $type = $this->getDirectoryType(); return new $type($dirconv); }