• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(111)  |  Call(88)  |  Derive(0)  |  Import(23)
Copy all stat info (mode bits, atime, mtime, flags) from src to dst

        def copystat(src, dst):
    """Copy all stat info (mode bits, atime, mtime, flags) from src to dst"""
    st = os.stat(src)
    mode = stat.S_IMODE(st.st_mode)
    if hasattr(os, 'utime'):
        os.utime(dst, (st.st_atime, st.st_mtime))
    if hasattr(os, 'chmod'):
        os.chmod(dst, mode)
    if hasattr(os, 'chflags') and hasattr(st, 'st_flags'):
        try:
            os.chflags(dst, st.st_flags)
        except OSError, why:
            if (not hasattr(errno, 'EOPNOTSUPP') or
                why.errno != errno.EOPNOTSUPP):
                raise
        


src/s/c/scrapy-HEAD/scrapy/utils/py26.py   scrapy(Download)
import os
import fnmatch
import pkgutil
from shutil import copy2, copystat
 
__all__ = ['cpu_count', 'copytree', 'ignore_patterns']
 
            except Error, err:
                errors.extend(err.args[0])
        try:
            copystat(src, dst)
        except OSError, why:
            if WindowsError is not None and isinstance(why, WindowsError):
                # Copying file access times may fail on Windows

src/s/c/Scrapy-0.10.3/scrapy/utils/py26.py   Scrapy(Download)
import sys
import os
import fnmatch
from shutil import copy2, copystat
 
__all__ = ['cpu_count', 'copytree', 'ignore_patterns']
 
            except Error, err:
                errors.extend(err.args[0])
        try:
            copystat(src, dst)
        except OSError, why:
            if WindowsError is not None and isinstance(why, WindowsError):
                # Copying file access times may fail on Windows

src/c/p/cpacman-HEAD/cpacman/bundles/trunk-bundle/cpacman/cpacman/pycli/utils.py   cpacman(Download)
 
import getopt
import os
from shutil import copyfile,copystat
 
from logging import logger
 
def copy_file(src,dst,test_run=0):
        if test_run: return
        copyfile(src,dst)
        copystat(src,dst)
 
def delete_file(src,test_run=0):
        if test_run: return

src/c/p/cpacman-HEAD/cpacman/bundles/stabilizing-0.7/cpacman/cpacman/pycli/utils.py   cpacman(Download)
import getopt
import os
import re
from shutil import copyfile,copystat
 
from logging import logger
 
def copy_file(src,dst,test_run=0):
        if test_run: return
        copyfile(src,dst)
        copystat(src,dst)
 
def delete_file(src,test_run=0):
        if test_run: return

src/c/p/cpacman-HEAD/cpacman/bundles/release-0.6/cpacman/cpacman/pycli/utils.py   cpacman(Download)
 
import getopt
import os
from shutil import copyfile,copystat
 
def printDbg(*kwargs):
    return
def copy_file(src,dst,test_run=0):
        if test_run: return
        copyfile(src,dst)
        copystat(src,dst)
 
def delete_file(src,test_run=0):
        if test_run: return

src/p/y/pycli-HEAD/dvd_backup/bundles/trunk_bundle/dvd_backup/pycli/utils.py   pycli(Download)
 
import getopt
import os
from shutil import copyfile,copystat
 
from logging import logger
 
def copy_file(src,dst,test_run=0):
        if test_run: return
        copyfile(src,dst)
        copystat(src,dst)
 
def delete_file(src,test_run=0):
        if test_run: return

src/p/y/pycli-HEAD/pycli/trunk/lib/utils.py   pycli(Download)
 
import getopt
import os
from shutil import copyfile,copystat
 
from logging import logger
 
def copy_file(src,dst,test_run=0):
        if test_run: return
        copyfile(src,dst)
        copystat(src,dst)
 
def delete_file(src,test_run=0):
        if test_run: return

src/r/e/reporter-lib-HEAD/packages/Django/django/core/files/move.py   reporter-lib(Download)
from django.core.files import locks
 
try:
    from shutil import copystat
except ImportError:
    import stat
    def copystat(src, dst):

src/b/a/badger-lib-HEAD/packages/Django/django/core/files/move.py   badger-lib(Download)
from django.core.files import locks
 
try:
    from shutil import copystat
except ImportError:
    import stat
    def copystat(src, dst):

src/m/d/mdn-lib-HEAD/packages/Django/django/core/files/move.py   mdn-lib(Download)
from django.core.files import locks
 
try:
    from shutil import copystat
except ImportError:
    import stat
    def copystat(src, dst):

  1 | 2 | 3  Next