With pysftp or Paramiko, how can I get a directory listing complete with attributes?
问题 As the title says, I'm trying to get a list of all the files and directories in a directory, including their attributes (I'm looking for at least name, size, last modified, and is it a file or a folder). I'm using Python 3 on Windows. I've tried listdir() , and I get a list of files without attributes. I've tried listdir_attr() , and I get a list of attributes, but no filenames - and I don't see anything that guarantees that those two lists will be in the same order, so as far as I know, I