environment/lib/python2.7/site-packages/distribute-0.6.31-py2.7.egg/setuptools/archive_util.py
def unpack_directory(filename, extract_dir, progress_filter=default_filter):
    """"Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    """
    if not os.path.isdir(filename):
        raise UnrecognizedFormat("%s is not a directory" % (filename,))

    paths = {filename:('',extract_dir)}
    for base, dirs, files in os.walk(filename):
        src,dst = paths[base]
        for d in dirs:
            paths[os.path.join(base,d)] = src+d+'/', os.path.join(dst,d)
        for f in files:
            name = src+f
            target = os.path.join(dst,f)
            target = progress_filter(src+f, target)
            if not target:
                continue    # skip non-files
            ensure_directory(target)
            f = os.path.join(base,f)
            shutil.copyfile(f, target)
            shutil.copystat(f, target)
def unpack_directory(filename, extract_dir, progress_filter=default_filter):
    "if not os.path.isdir(filename):
        raise UnrecognizedFormat("%s is not a directory" % (filename,))

    paths = {filename:('',extract_dir)}
    for base, dirs, files in os.walk(filename):
        src,dst = paths[base]
        for d in dirs:
            paths[os.path.join(base,d)] = src+d+'/', os.path.join(dst,d)
        for f in files:
            name = src+f
            target = os.path.join(dst,f)
            target = progress_filter(src+f, target)
            if not target:
                continue    # skip non-files
            ensure_directory(target)
            f = os.path.join(base,f)
            shutil.copyfile(f, target)
            shutil.copystat(f, target)
def unpack_directory ( filename , extract_dir , progress_filter = default_filter ) : if not os . path . isdir ( filename ) : raise UnrecognizedFormat ( "%s is not a directory" % ( filename , ) ) paths = { filename : ( '' , extract_dir ) } for base , dirs , files in os . walk ( filename ) : src , dst = paths [ base ] for d in dirs : paths [ os . path . join ( base , d ) ] = src + d + '/' , os . path . join ( dst , d ) for f in files : name = src + f target = os . path . join ( dst , f ) target = progress_filter ( src + f , target ) if not target : continue # skip non-files ensure_directory ( target ) f = os . path . join ( base , f ) shutil . copyfile ( f , target ) shutil . copystat ( f , target )
Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
Unpack a directory using the same interface as for archives