I can not find a function in python to get information about the time the directory was created.
- Related question: Python Selecting the most recent file from the directory (my answer there shows how not only to get the creation date on Windows). - jfs
|
1 answer
import os import time path = '.idea' a = os.path.getatime(path) # время последнего доступа b = os.path.getmtime(path) # время последнего изменения c = os.path.getctime(path) # время создания (Windows), время последнего изменения (Unix) print([time.ctime(x) for x in [a, b, c]]) - oneAnd this option will work in all operating systems or in some specific? For example, ctime is a note: "It is the creation of the system." 1 - Batanichek
- 2I used similar functions on
php, in my opinion it does not work correctly on Windows. - A1essandro
|