HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/epamokos.kaunokolegija.lt/wp-content/plugins/loco-translate/src/fs/Link.php
<?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;
    }
    
}