How do I get file creation and modification date/times?
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Digital Sunset Looping
--
Chapters
00:00 Question
00:22 Accepted answer (Score 170)
01:32 Answer 2 (Score 863)
03:58 Answer 3 (Score 769)
04:48 Answer 4 (Score 427)
05:29 Thank you
--
Full question
https://stackoverflow.com/questions/2370...
Accepted answer links:
[pathlib module]: https://docs.python.org/3/library/pathli...
[the documentation]: https://docs.python.org/3/library/os.htm...
[This article]: https://realpython.com/python-pathlib/
Answer 2 links:
[os.path.getmtime(path)]: https://docs.python.org/library/os.path....
https://msdn.microsoft.com/en-us/library...
[os.path.getctime()]: https://docs.python.org/library/os.path....
[.st_ctime]: https://docs.python.org/3/library/os.htm...
[os.stat()]: https://docs.python.org/3/library/os.htm...
[is the last time that the file's attributes ]: http://www.linux-faqs.info/general/diffe...
[.st_birthtime]: https://docs.python.org/3/library/os.htm...
[do store creation dates]: https://unix.stackexchange.com/questions...
[offers no way of accessing them]: https://unix.stackexchange.com/questions...
[don't contain any creation date fields]: https://github.com/torvalds/linux/blob/v...
[Python source]: https://github.com/python/cpython/search...
[os.path.getmtime()]: https://docs.python.org/library/os.path....
[.st_mtime]: https://docs.python.org/3/library/os.htm...
Answer 3 links:
[os.path.getmtime]: https://docs.python.org/library/os.path....
[os.path.getctime]: https://docs.python.org/library/os.path....
[os.stat]: https://docs.python.org/library/os.html#...
[inode]: https://en.wikipedia.org/wiki/Inode
[kojiro for making that fact more clear]: https://stackoverflow.com/questions/2370...
Answer 4 links:
[os.path.getmtime()]: http://docs.python.org/library/os.path.h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #file
#avk47
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Digital Sunset Looping
--
Chapters
00:00 Question
00:22 Accepted answer (Score 170)
01:32 Answer 2 (Score 863)
03:58 Answer 3 (Score 769)
04:48 Answer 4 (Score 427)
05:29 Thank you
--
Full question
https://stackoverflow.com/questions/2370...
Accepted answer links:
[pathlib module]: https://docs.python.org/3/library/pathli...
[the documentation]: https://docs.python.org/3/library/os.htm...
[This article]: https://realpython.com/python-pathlib/
Answer 2 links:
[os.path.getmtime(path)]: https://docs.python.org/library/os.path....
https://msdn.microsoft.com/en-us/library...
[os.path.getctime()]: https://docs.python.org/library/os.path....
[.st_ctime]: https://docs.python.org/3/library/os.htm...
[os.stat()]: https://docs.python.org/3/library/os.htm...
[is the last time that the file's attributes ]: http://www.linux-faqs.info/general/diffe...
[.st_birthtime]: https://docs.python.org/3/library/os.htm...
[do store creation dates]: https://unix.stackexchange.com/questions...
[offers no way of accessing them]: https://unix.stackexchange.com/questions...
[don't contain any creation date fields]: https://github.com/torvalds/linux/blob/v...
[Python source]: https://github.com/python/cpython/search...
[os.path.getmtime()]: https://docs.python.org/library/os.path....
[.st_mtime]: https://docs.python.org/3/library/os.htm...
Answer 3 links:
[os.path.getmtime]: https://docs.python.org/library/os.path....
[os.path.getctime]: https://docs.python.org/library/os.path....
[os.stat]: https://docs.python.org/library/os.html#...
[inode]: https://en.wikipedia.org/wiki/Inode
[kojiro for making that fact more clear]: https://stackoverflow.com/questions/2370...
Answer 4 links:
[os.path.getmtime()]: http://docs.python.org/library/os.path.h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #file
#avk47