
The os System Module
|
103
TMP_MAX
The maximum number of unique names that tmpnam gen-
erates before reusing names.
utime(path, (atime, mtime))
Sets file path access and modification times.
access(path, mode)
statvfs(path)
pathconf(path, infoname)
pathconf_names
Consult the Python Library Reference or Unix manpages
for details.
walk(top [, topdown=True [, onerror=None]]))
Generates the filenames in a directory tree by walking the
tree either top-down or bottom-up. For each directory in
the tree rooted at directory
top (including top itself),
yields a three-tuple
(dirpath, dirnames, filenames).
dirpath is a string, the path to the directory. dirnames is a
list of the names of the subdirectories in
dirpath (exclud-
ing
. and ..). filenames is a list of the names of the non-
directory files in
dirpath. Note that the names in the lists
do not contain path components. To get a full path
(which begins with
top) to a file or directory in dirpath,
do
os.path.join(dirpath, name).
If optional argument
topdown is true or not specified, the
triple for a directory is generated before the triples for
any of its subdirectories (directories are generated top-
down). If
topdown is false, the triple for a directory is gen-
erated after the triples for all its subdirectories (directories
are generated bottom-up). If optional
onerror
is
specified,
it should be a function, which will be called with one
argument, an
os.error instance. See also ...