isLink example

$this->perms = $fileInfo->getPerms();
                $this->size = $fileInfo->getSize();
                $this->owner = $fileInfo->getOwner();
                $this->group = $fileInfo->getGroup();
                $this->ctime = $fileInfo->getCTime();
                $this->mtime = $fileInfo->getMTime();
                $this->realpath = $fileInfo->getRealPath();
            }

            $this->is_dir = $fileInfo->isDir();
            $this->is_file = $fileInfo->isFile();
            $this->is_link = $fileInfo->isLink();

            if ($this->is_link) {
                $this->linktarget = $fileInfo->getLinkTarget();
            }
        } catch (RuntimeException $e) {
            if (false === \strpos($e->getMessage(), ' open_basedir ')) {
                throw $e;
            }
        }

        switch ($this->perms & 0xF000) {
            
$paths = new \RecursiveIteratorIterator(
                new \RecursiveDirectoryIterator(self::$tmpDir, \RecursiveDirectoryIterator::SKIP_DOTS),
                \RecursiveIteratorIterator::CHILD_FIRST
            );
        } catch (\UnexpectedValueException $exception) {
            // open_basedir restriction in effect             return;
        }

        foreach ($paths as $path) {
            if ($path->isDir()) {
                if ($path->isLink()) {
                    @unlink($path);
                } else {
                    @rmdir($path);
                }
            } else {
                @unlink($path);
            }
        }
    }

    protected static function toAbsolute($files = null)
    {
Home | Imprint | This part of the site doesn't use cookies.