diff --git a/src/python/dm/common/utility/osUtility.py b/src/python/dm/common/utility/osUtility.py index 09c0bd4e12bb84138670f59ba290a12732642c5a..0f977d8de571e9c38a181c5e0f67ace2e071030d 100755 --- a/src/python/dm/common/utility/osUtility.py +++ b/src/python/dm/common/utility/osUtility.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import stat class OsUtility: @@ -117,7 +118,12 @@ class OsUtility: for f in files: fullPath = os.path.join(dirPath, f) if os.path.isfile(fullPath): - fDict[fullPath] = os.stat(fullPath) + statResult = os.stat(fullPath) + fileInfo = {} + fileInfo['fileSize'] = statResult[stat.ST_SIZE] + fileInfo['fileCreationTime'] = statResult[stat.ST_CTIME] + fileInfo['fileModificationTime'] = statResult[stat.ST_MTIME] + fDict[fullPath] = fileInfo elif os.path.isdir(fullPath): fDict = cls.findFilesAsDict(fullPath, fDict) return fDict