src/Server/LocalServer.php
protected function internalMove(
        BucketInterface $bucket,
        string $filename,
        string $destination
    ): bool {
        if (!$this->files->exists($filename)) {
            throw new ServerException("Unable to move '{$filename}', object does not exists");
        }

        $mode = $bucket->getOption('mode', FilesInterface::RUNTIME);

        //Pre-ensuring location
        $this->files->ensureDirectory(dirname($destination), $mode);

        if (!$this->files->move($filename, $destination)) {
            throw new ServerException("Unable to move '{$filename}' to '{$destination}'.");
        }

        return $this->files->setPermissions($destination, $mode);
    }
protected function internalMove(
        BucketInterface $bucket,
        string $filename,
        string $destination
    ): bool {
        if (!$this->files->exists($filename)) {
            throw new ServerException("Unable to move '{$filename}', object does not exists");
        }

        $mode = $bucket->getOption('mode', FilesInterface::RUNTIME);

        //Pre-ensuring location
        $this->files->ensureDirectory(dirname($destination), $mode);

        if (!$this->files->move($filename, $destination)) {
            throw new ServerException("Unable to move '{$filename}' to '{$destination}'.");
        }

        return $this->files->setPermissions($destination, $mode);
    }
protected function internalMove ( BucketInterface $ bucket , string $ filename , string $ destination ) : bool { if ( ! $ this -> files -> exists ( $ filename ) ) { throw new ServerException ( "Unable to move '{$filename}', object does not exists" ) ; } $ mode = $ bucket -> getOption ( 'mode' , FilesInterface :: RUNTIME ) ; //Pre-ensuring location $ this -> files -> ensureDirectory ( dirname ( $ destination ) , $ mode ) ; if ( ! $ this -> files -> move ( $ filename , $ destination ) ) { throw new ServerException ( "Unable to move '{$filename}' to '{$destination}'." ) ; } return $ this -> files -> setPermissions ( $ destination , $ mode ) ; }
Move helper, ensure target directory existence, file permissions and etc.

@param BucketInterface $bucket
@param string          $filename
@param string          $destination

@return bool
@throws ServerException
Move helper ensure target directory existence file permissions and etc .