summaryrefslogtreecommitdiffstats
path: root/Doc/library/stat.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/stat.rst')
-rw-r--r--Doc/library/stat.rst15
1 files changed, 10 insertions, 5 deletions
diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst
index 7de98b6..02513df 100644
--- a/Doc/library/stat.rst
+++ b/Doc/library/stat.rst
@@ -104,6 +104,16 @@ Example::
if __name__ == '__main__':
walktree(sys.argv[1], visitfile)
+An additional utility function is provided to covert a file's mode in a human
+readable string:
+
+.. function:: filemode(mode)
+
+ Convert a file's mode to a string of the form '-rwxrwxrwx'.
+
+ .. versionadded:: 3.3
+
+
All the variables below are simply symbolic indexes into the 10-tuple returned
by :func:`os.stat`, :func:`os.fstat` or :func:`os.lstat`.
@@ -172,10 +182,6 @@ The variables below define the flags used in the :data:`ST_MODE` field.
Use of the functions above is more portable than use of the first set of flags:
-.. data:: S_IFMT
-
- Bit mask for the file type bit fields.
-
.. data:: S_IFSOCK
Socket.
@@ -344,4 +350,3 @@ The following flags can be used in the *flags* argument of :func:`os.chflags`:
The file is a snapshot file.
See the \*BSD or Mac OS systems man page :manpage:`chflags(2)` for more information.
-