From 96a60e4af574d72f14ad70fc4db5986e1ad42aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 31 Dec 2002 13:11:54 +0000 Subject: Patch #658927: Add getctime to os.path. Document that getatime and getmtime may return floats. --- Lib/macpath.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/macpath.py') diff --git a/Lib/macpath.py b/Lib/macpath.py index 734bae292e..ba9d40b743 100644 --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -5,7 +5,7 @@ from stat import * __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", - "getatime","islink","exists","isdir","isfile", + "getatime","getctime", "islink","exists","isdir","isfile", "walk","expanduser","expandvars","normpath","abspath", "supports_unicode_filenames"] @@ -129,6 +129,9 @@ def isfile(s): return False return S_ISREG(st.st_mode) +def getctime(filename): + """Return the creation time of a file, reported by os.stat().""" + return os.stat(filename).st_ctime def exists(s): """Return True if the pathname refers to an existing file or directory.""" -- cgit v1.2.1