currently what I do is:
import os
dir = '/var/www/site1.com'
modTime = os.path.getmtime(dir)
But the modification time is not as recent as the modification time of the most recent file modified inside that folder. Is there a way to get the mtime of that directory/folder with respect to the files/folder inside it?
Not without looking at the
mtimevalue for each and every file in that folder.You can use
max()on thegetmtimevalue for each entry in the folder: