blob: 7644d81da654911219212e29cf86d16c830791fc [file] [log] [blame]
Fred Drakec817e271998-08-10 18:40:22 +00001\section{\module{mac} ---
Fred Drake59d8b731999-02-01 20:19:38 +00002 Implementations for the \module{os} module}
Fred Drakefe7f3bc1998-07-23 17:55:31 +00003
Fred Drakef6863c11999-03-02 16:37:17 +00004\declaremodule{builtin}{mac}
5 \platform{Mac}
Fred Drake59d8b731999-02-01 20:19:38 +00006\modulesynopsis{Implementations for the \module{os} module.}
Fred Drakefe7f3bc1998-07-23 17:55:31 +00007
Fred Drake55fca541998-02-18 15:21:26 +00008
Fred Drake59d8b731999-02-01 20:19:38 +00009This module implements the operating system dependent functionality
10provided by the standard module \module{os}\refstmodindex{os}. It is
11best accessed through the \module{os} module.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000012
13The following functions are available in this module:
Fred Drake55fca541998-02-18 15:21:26 +000014\function{chdir()},
15\function{close()},
16\function{dup()},
17\function{fdopen()},
18\function{getcwd()},
19\function{lseek()},
20\function{listdir()},
21\function{mkdir()},
22\function{open()},
23\function{read()},
24\function{rename()},
25\function{rmdir()},
26\function{stat()},
27\function{sync()},
28\function{unlink()},
29\function{write()},
30as well as the exception \exception{error}. Note that the times
31returned by \function{stat()} are floating-point values, like all time
32values in MacPython.
Guido van Rossum7e42cab1996-10-15 14:37:31 +000033
Fred Drake59d8b731999-02-01 20:19:38 +000034One additional function is available:
35
36\begin{funcdesc}{xstat}{path}
37 This function returns the same information as \function{stat()}, but
38 with three additional values appended: the size of the resource fork
39 of the file and its 4-character creator and type.
40\end{funcdesc}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000041
Fred Drakefe7f3bc1998-07-23 17:55:31 +000042
Fred Drakec817e271998-08-10 18:40:22 +000043\section{\module{macpath} ---
Fred Drake59d8b731999-02-01 20:19:38 +000044 MacOS path manipulation functions}
Fred Drakefe7f3bc1998-07-23 17:55:31 +000045
Fred Drakef6863c11999-03-02 16:37:17 +000046\declaremodule{standard}{macpath}
47% Could be labeled \platform{Mac}, but the module should work anywhere and
48% is distributed with the standard library.
Fred Drakefe7f3bc1998-07-23 17:55:31 +000049\modulesynopsis{MacOS path manipulation functions.}
50
Fred Drake55fca541998-02-18 15:21:26 +000051
Fred Drake59d8b731999-02-01 20:19:38 +000052This module is the Macintosh implementation of the \module{os.path}
Fred Drakecf282cd1999-04-28 14:04:36 +000053module. It is most portably accessed as
Fred Drakee15eb351999-11-10 16:13:25 +000054\module{os.path}\refstmodindex{os.path}. Refer to the
55\citetitle[../lib/lib.html]{Python Library Reference} for
56documentation of \module{os.path}.
Guido van Rossum5fdeeea1994-01-02 01:22:07 +000057
58The following functions are available in this module:
Fred Drake55fca541998-02-18 15:21:26 +000059\function{normcase()},
60\function{normpath()},
61\function{isabs()},
62\function{join()},
63\function{split()},
64\function{isdir()},
65\function{isfile()},
66\function{walk()},
67\function{exists()}.
Fred Drake59d8b731999-02-01 20:19:38 +000068For other functions available in \module{os.path} dummy counterparts
Guido van Rossum66774a91996-07-21 02:20:58 +000069are available.