Ticket #8673: copystat-missing-import.diff

File copystat-missing-import.diff, 716 bytes (added by vung, 11 years ago)
  • django/core/files/move.py

     
    11"""
    22Move a file in the safest way possible::
    33
    44    >>> from django.core.files.move import file_move_save
    55    >>> file_move_save("/tmp/old_file", "/tmp/new_file")
    66"""
    77
    88import os
     9import stat
    910from django.core.files import locks
    1011
    1112try:
    1213    from shutil import copystat
    1314except ImportError:
    1415    def copystat(src, dst):
    1516        """Copy all stat info (mode bits, atime and mtime) from src to dst"""
    1617        st = os.stat(src)
    1718        mode = stat.S_IMODE(st.st_mode)
    1819        if hasattr(os, 'utime'):
Back to Top