public function delete(FileInterface $file)
    {

        if(isset($this->fs[$file->getPath()])){
            unset($this->fs[$file->getPath()]);
        }
        if($dir = $file->getDir()){
            $dir->removeChild($file);
        }
        return $this;

    }
public function delete(FileInterface $file)
    {

        if(isset($this->fs[$file->getPath()])){
            unset($this->fs[$file->getPath()]);
        }
        if($dir = $file->getDir()){
            $dir->removeChild($file);
        }
        return $this;

    }
public function delete ( FileInterface $ file ) { if ( isset ( $ this -> fs [ $ file -> getPath ( ) ] ) ) { unset ( $ this -> fs [ $ file -> getPath ( ) ] ) ; } if ( $ dir = $ file -> getDir ( ) ) { $ dir -> removeChild ( $ file ) ; } return $ this ; }
Delete the file. If it is a directory recursively delete it

@param \FileDB\Contracts\Model\File $file
@return self
Delete the file . If it is a directory recursively delete it