_removeFile

@param string $file Path of the file
@return bool
965193
protected function _removeFile($file)
    {
        $_file = new File($file);

        if ($_file->exists()) {
            $_file->delete();

            $folder = $_file->folder();
            if (count($folder->find()) === 0) {
                $folder->delete();
            }
            return true;
        }
        return false;
    }
604021
public function delete($file)
    {
        return ($this->isConnected() === true) ? ftp_delete($this->getConnection(), $file) : false;
    }
620099
protected function deleteFile($file, $dir) {
        if ($file != "." && $file != "..") {
            if (is_dir($dir."/".$file)) {
                $this->flushDir($dir."/".$file);
                rmdir($dir."/".$file);
            } else {
                unlink($dir."/".$file);
            }
        }
    }
559719
public static boolean deleteFile(File file) {
        if (file.exists()) {
            if (file.isDirectory()) {
                try {
                    deleteDirectory(file);
                    return true;
                } catch (IOException e) {
                    logger.error(e.getMessage());
                    return false;
                }
            } else {
                return file.delete();
            }
        }
        return false;
    }
22857
public function removeFile( $fileName )
	{
		if( !$this->numFiles )
			return FALSE;
		foreach( $this->files as $key => $information )
		{
			if( $information['name'] !== $fileName )
				continue;
			$this->numFiles--;
			unset( $this->files[$key] );
			return TRUE;
		}
	}
856087
public function removeFile(\Haven\CoreBundle\Entity\File\File $files)
    {
        $this->files->removeElement($files);
    }
138177
public function remove($files)
    {
        foreach ($files as $file) {
            try {
                $this->filesystem->delete($file);
            }
            catch (Exception $e) {
                // Ignore not found exceptions
            }
        }
    }
1370628
public function remove($files)
    {
        if ($files instanceof \Traversable) {
            $files = iterator_to_array($files, false);
        } elseif (!is_array($files)) {
            $files = array($files);
        }
        $files = array_reverse($files);
        foreach ($files as $file) {
            if (is_link($file)) {
                // See https://bugs.php.net/52176
                if (!@(unlink($file) || '\\' !== DIRECTORY_SEPARATOR || rmdir($file)) && file_exists($file)) {
                    $error = error_get_last();
                    throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, $error['message']));
                }
            } elseif (is_dir($file)) {
                $this->remove(new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS));

                if (!@rmdir($file) && file_exists($file)) {
                    $error = error_get_last();
                    throw new IOException(sprintf('Failed to remove directory "%s": %s.', $file, $error['message']));
                }
            } elseif (!@unlink($file) && file_exists($file)) {
                $error = error_get_last();
                throw new IOException(sprintf('Failed to remove file "%s": %s.', $file, $error['message']));
            }
        }
    }
858738
public function delete($file = null)
	{
		$file = $file ?: $this->file;
		if ($this->fs->exists($file))
			$this->fs->delete($file);
		if ($this->f3->get('CACHE')) {
			$cache = \Cache::instance();
			if($cache->exists($cacheHash = $this->getCacheHash($file)))
				$cache->clear($cacheHash);
		}
		$this->metaHandle->delete($file);
	}
857573
public static function deleteFolder($path) 
	{
		if(file_exists($path)) {
			$fh = dir($path);
			//print_r($fh);
			while (false !== ($files = $fh->read())) {
				/*
				echo $fh->path.'/'.$files."\n";
				chmod($fh->path.'/'.$files, 0755);
				if(@unlink($fh->path.'/'.$files))
					echo '1'."\n";
				else
					echo '0'."\n";
				*/
				@unlink($fh->path.'/'.$files);
			}
			$fh->close();
			@rmdir($path);

			return true;

		} else 
			return false;
	}
1346217
private function deleteFile($file = null) {
        // no file
        if(!$file || is_array($file))
            return false;

        // get a file and delete it
        $file = new File($this->_config['root'] . trim(str_replace('/', DS, $file), DS));
        if($file->exists())
            return $file->delete();

        // nothing found
        return false;
    }
176050
public function remove($file)
    {
        if (($isArray = is_array($file)) || $file instanceof Traversable) {
            $result = true;
            foreach ($file as $key => $f) {
                try {
                    if ( ! $this->remove($f)) {
                        $result = false;
                    }
                }
                catch (InvalidArgumentException $e) {
                    throw new UnexpectedValueException(
                        sprintf(
                            "%s's value at key %s caused InvalidArgumentException",
                            $isArray ? 'Array' : 'FileBag',
                            $key
                        ),
                        null,
                        $e
                    );
                }
                catch (UnexpectedValueException $e) {
                    throw new UnexpectedValueException(
                        sprintf(
                            "%s's value at key %s caused UnexpectedValueException",
                            $isArray ? 'Array' : 'FileBag',
                            $key
                        ),
                        null,
                        $e
                    );
                }
            }
            return $result;
        }
        elseif ($file instanceof SplFileInfo
            || $file instanceof File
        ) {
            if ($this->files->contains($file)) {
                $this->files->removeElement($file);
                return true;
            }
            return false;
        }

        throw InvalidArgumentException::create(
            implode('|', array(
                'Axstrad\Component\Filesystem\FileBag',
                'SplFileInfo[]',
                'Axstrad\Component\Filesystem\File[]',
                'SplFileInfo',
                'Axstrad\Component\Filesystem\File'
            )),
            $file
        );
    }
1238193
public function move($file) {
        $result = true;
        $this->map(function (FileObject $item) use (&$result, $file) {
            $result = $result && $item->move($file. '/'. $item->getName());
        });
        return $result;
    }
764668
public function destroy($file)
    {
        $this->manager->resetPath($file);

        if (!$this->manager->blobExists()) {
            return $this->json('File not found.', 404);
        }

        $isRemoved = $this->manager->delete();

        return $this->json($isRemoved, $isRemoved ? 200 : 500);
    }
371149
public static function delFile($file, $image = false)
    {
        $fileStatic = Folder::getStatic($file);

        if(!file_exists($fileStatic)){
            return;
        }

        if(file_exists($fileStatic) && !is_dir($fileStatic)){
            @unlink($fileStatic);
        }

        if($image){
            $pathInfo = pathinfo($file);

            if($pathInfo['dirname'] == UPLOAD_FOLDER){
                $thumbFolder = THUMB_FOLDER;
            }else{
                $thumbFolder = str_replace(UPLOAD_FOLDER . '/', THUMB_FOLDER . '/', $pathInfo['dirname']);
            }

            $thumbs = glob(Folder::getStatic($thumbFolder . '/' . $pathInfo['filename'] . '_*.' . $pathInfo['extension']));

            if($thumbs){
                foreach($thumbs as $thumb){
                    @unlink($thumb);
                }
            }
        }
    }
1114813
public function remove($url)
    {
        $file = $this->_dir . '/' . $this->_urlToFile($url);

        if (file_exists($file))
        {
            unlink($file);

            return true;
        }

        return false;
    }
389500
public function delete(File $file)
    {
        if ($this->adapter->delete($file->path)) {
            return $file;
        }

        return false;
    }