protected function isValidRename($source, $dest)
    {
        $adapter = $this->filesystem->getAdapter();

        if ( ! $adapter->has($source)) {
            throw new FileNotFoundException($source);
        }

        $subdir = Util::dirname($dest);

        if (strlen($subdir) && ! $adapter->has($subdir)) {
            throw new FileNotFoundException($source);
        }

        if ( ! $adapter->has($dest)) {
            return true;
        }

        return $this->compareTypes($source, $dest);
    }
protected function isValidRename($source, $dest)
    {
        $adapter = $this->filesystem->getAdapter();

        if ( ! $adapter->has($source)) {
            throw new FileNotFoundException($source);
        }

        $subdir = Util::dirname($dest);

        if (strlen($subdir) && ! $adapter->has($subdir)) {
            throw new FileNotFoundException($source);
        }

        if ( ! $adapter->has($dest)) {
            return true;
        }

        return $this->compareTypes($source, $dest);
    }
protected function isValidRename ( $ source , $ dest ) { $ adapter = $ this -> filesystem -> getAdapter ( ) ; if ( ! $ adapter -> has ( $ source ) ) { throw new FileNotFoundException ( $ source ) ; } $ subdir = Util :: dirname ( $ dest ) ; if ( strlen ( $ subdir ) && ! $ adapter -> has ( $ subdir ) ) { throw new FileNotFoundException ( $ source ) ; } if ( ! $ adapter -> has ( $ dest ) ) { return true ; } return $ this -> compareTypes ( $ source , $ dest ) ; }
Checks that a rename is valid.

@param string $source
@param string $dest

@return bool

@throws \League\Flysystem\FileNotFoundException
@throws \Twistor\Flysystem\Exception\DirectoryExistsException
@throws \Twistor\Flysystem\Exception\DirectoryNotEmptyException
@throws \Twistor\Flysystem\Exception\NotADirectoryException
Checks that a rename is valid .