summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorTom Collins <tom.collins@digi.com>2018-03-08 16:02:26 -0800
committerDamien George <damien.p.george@gmail.com>2018-03-12 12:26:36 +1100
commit4d3a92c67c9b1550eaf07d06ed74de996ee8fa3b (patch)
treeed0c98b17d40ac5c738d7a668dc2a6b80ec5baea /docs/library
parent1345093401ed0812aa72dc5206cb8fd5fe61917f (diff)
extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple.
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/uos.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/library/uos.rst b/docs/library/uos.rst
index 85adb6a4d..27f339bb1 100644
--- a/docs/library/uos.rst
+++ b/docs/library/uos.rst
@@ -43,11 +43,11 @@ Filesystem access
.. function:: ilistdir([dir])
- This function returns an iterator which then yields 3-tuples corresponding to
+ 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 3-tuples have the form *(name, type, inode)*:
+ The tuples have the form *(name, type, inode[, size])*:
- *name* is a string (or bytes if *dir* is a bytes object) and is the name of
the entry;
@@ -55,6 +55,10 @@ Filesystem access
directories and 0x8000 for regular files;
- *inode* is an integer corresponding to the inode of the file, and may be 0
for filesystems that don't have such a notion.
+ - Some platforms may return a 4-tuple that includes the entry's *size*. For
+ file entries, *size* is an integer representing the size of the file
+ or -1 if unknown. Its meaning is currently undefined for directory
+ entries.
.. function:: listdir([dir])