uos.ilistdir([dir])
This function returns an iterator which then yields tuples corresponding to the entries in the directory that it is listing. With no argument it lists the current directory, otherwise it lists the directory given by dir. The tuples have the form (name, type, inode, size):
- name: A string (or bytes if dir is a bytes object) and it is the name of the entry.
- type: An integer that specifies the type of the entry, with 0x4000 for directories and 0x8000 for regular files.
- inode: An integer corresponding to the inode of the file. On XBee devices, set to 0 for regular files and directories and -1 for secure files.
- size: An integer representing the size of the file or -1 if unknown. Its meaning is currently undefined for directory entries.