/** * Returns whether a sub-path exists below this directory * * @param \r8\FileSys|String $subPath The subpath to search for * @return Boolean */ public function contains($subPath) { if (!$this->dirExists()) { throw new \r8\Exception\Variable("Dir", "No directory has been set for this instance"); } $subPath = new \r8\FileSys\File($subPath); $subPath->resolve($this->getPath()); return $subPath->isDir() || $subPath->isFile(); }