I am converting my python program from paramiko to ssh2. I have succeeded in authenticating and I can get a directory listing. Where I am stuck is as I process through the directory listing how do I recognize whether the "file" is a directory or a file. I see the attributes but of those I can only see atime being something I will want to use (to know how old the file is). Once I have done the opendir and readdir (and so have a listing of files) how do I recognize whether each is a file or a directory?
When I do the readdir I am returned:
- Length of filename
- filename
- attributes
- atime
- filesize
- flags
- gid
- mtime
- permissions
- uid