lib/Touki/FTP/Manager/FTPFilesystemManager.php
public function findFilesystemByName($name, Directory $inDirectory = null)
    {
        $name = '/'.ltrim($name, '/');
        $directory = dirname($name);
        $directory = str_replace('\\', '/', $directory); // Issue #7

        if ($inDirectory) {
            $name      = sprintf("/%s", ltrim($inDirectory->getRealpath().$name, '/'));
            $directory = $inDirectory;
        }

        return $this->findOneBy($directory, function ($item) use ($name) {
            return $name == $item->getRealpath();
        });
    }
public function findFilesystemByName($name, Directory $inDirectory = null)
    {
        $name = '/'.ltrim($name, '/');
        $directory = dirname($name);
        $directory = str_replace('\\', '/', $directory); // Issue #7

        if ($inDirectory) {
            $name      = sprintf("/%s", ltrim($inDirectory->getRealpath().$name, '/'));
            $directory = $inDirectory;
        }

        return $this->findOneBy($directory, function ($item) use ($name) {
            return $name == $item->getRealpath();
        });
    }
public function findFilesystemByName ( $ name , Directory $ inDirectory = null ) { $ name = '/' . ltrim ( $ name , '/' ) ; $ directory = dirname ( $ name ) ; $ directory = str_replace ( '\\' , '/' , $ directory ) ; // Issue #7 if ( $ inDirectory ) { $ name = sprintf ( "/%s" , ltrim ( $ inDirectory -> getRealpath ( ) . $ name , '/' ) ) ; $ directory = $ inDirectory ; } return $ this -> findOneBy ( $ directory , function ( $ item ) use ( $ name ) { return $ name == $ item -> getRealpath ( ) ; } ) ; }
Finds a filesystem by its name

@param  string         $name        Filesystem name
@param  Directory|null $inDirectory Directory to fetch in
@return Filesystem
Finds a filesystem by its name