I have a difficulty to find a file in my team drive because i also have file from trash.
There is my current code :
filename = 'name'
file_list = drive.ListFile({
'q':f"title contains '${filename}' and mimeType='application/pdf'",
'supportsAllDrives':True,
'corpora': "teamDrive",
'teamDriveId': 'ID',
'supportsTeamDrives' :True,
'includeItemsFromAllDrives':True,
}).GetList()
print(len(file_list))
but i have 3 files because 2 are in the trash.
Thank you