I can not find a function in python to get information about the time the directory was created.

1 answer 1

 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]]) 
  • one
    And 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
  • 2
    I used similar functions on php , in my opinion it does not work correctly on Windows. - A1essandro