public function removeFromLibrary(File $file)
    {
        if(!$this->containsFile($file)){
            return false;
        }
        if($this->whitelistContainsFile($file)){
            $this->removeFromWhitelist($file);
        }
        $file->delete();
        return !$this->containsFile($file);
    }