def deleteFile(self, file):
        if file.get('imported'):
            return

        q = {
            'sha512': file['sha512'],
            'assetstoreId': self.assetstore['_id']
        }
        matching = self.model('file').find(q, limit=2, fields=[])
        if matching.count(True) == 1:
            path = os.path.join(self.assetstore['root'], file['path'])
            if os.path.isfile(path):
                os.remove(path)
Deletes the file from disk if it is the only File in this assetstore
dataset/ETHPy150Open girder/girder/girder/utility/filesystem_assetstore_adapter.py/FilesystemAssetstoreAdapter.deleteFile