public function cleanLibrary(User $user = null)
    {
        foreach($this->getFileList($user) as $file){
            /** @var $file File */
            if(!$this->whitelistContainsFile($file)){
                /** @var $vf File */
                foreach($this->listVersionsToOriginal($file) as $vf){
                    $vf->delete();
                }
                $file->delete();
            }
        }
    }