I have to download some files from sftp using Python, I've tried to use listdir to list all of them, but my first attempt to use pysftp.listdir I receive this message : "module 'pysftp' has no attribute 'listdir'
import pysftp
cnopts = pysftp.CnOpts()
cnopts.hostkeys = None
myHostname = "99.99.999.999"
myUsername = "user"
myPassword = "*********"
with pysftp.Connection(host=myHostname, username=myUsername, password=myPassword,cnopts=cnopts) as sftp:
print("Connection succesfully stablished ... ")
pysftp.cd('public')
pysftp.listdir()