Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
grumpily
/
wp-content
/
plugins
/
loco-translate
/
src
/
fs
:
Link.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * */ class Loco_fs_Link extends Loco_fs_File { /** * @var Loco_fs_File */ private ?Loco_fs_File $real = null; /** * {@inheritdoc} */ public function __construct( $path ){ parent::__construct($path); $real = realpath( $this->getPath() ); if( is_string($real) ){ if( is_dir($real) ){ $this->real = new Loco_fs_Directory($real); } else { $this->real = new Loco_fs_File($real); } } } /** * @return Loco_fs_File|null */ public function resolve():?Loco_fs_File { return $this->real; } /** * {@inheritdoc} */ public function isDirectory():bool { return $this->real instanceof Loco_fs_Directory; } }