public function deleteFile(FileInterface $file)
    {
        $this->storage->deleteFile($file);
        $this->formatManager->deleteFormats($file);
        $this->em->remove($file);
        $this->em->flush();
    }
public function deleteFile(FileInterface $file)
    {
        $this->storage->deleteFile($file);
        $this->formatManager->deleteFormats($file);
        $this->em->remove($file);
        $this->em->flush();
    }
public function deleteFile ( FileInterface $ file ) { $ this -> storage -> deleteFile ( $ file ) ; $ this -> formatManager -> deleteFormats ( $ file ) ; $ this -> em -> remove ( $ file ) ; $ this -> em -> flush ( ) ; }
Deletes file and associated formats.

@param FileInterface $file
Deletes file and associated formats .