#NEWLINE# def copystat( src , dst ) : #NEWLINE# #INDENT# 'Copy all stat info (mode bits, atime and mtime) from src to dst' #NEWLINE# st = os . stat ( src ) #NEWLINE# mode = stat . S_IMODE ( st . st_mode ) #NEWLINE# if hasattr ( os , 'utime' ) : #NEWLINE# #INDENT# os . utime ( dst , ( st . st_atime , st . st_mtime ) ) #NEWLINE# #UNINDENT# if hasattr ( os , 'chmod' ) : #NEWLINE# #INDENT# os . chmod ( src , mode )