summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-20 00:05:45 +0200
committerhut <hut@lavabit.com>2010-04-20 00:05:45 +0200
commita3d5ed6ff40c13b8cec3ac145c4ea4e4f371f2f0 (patch)
tree7a6e341cbe964352ee72aec4009bfe3d1e906a1f /ranger
parentc9383c72b2f62bee90050d02a307381cb6bfa536 (diff)
downloadranger-a3d5ed6ff40c13b8cec3ac145c4ea4e4f371f2f0.tar.gz
ext.shutil_generatorized: remove unused functions/imports
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/shutil_generatorized.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py
index ca6be426..07455c4f 100644
--- a/ranger/ext/shutil_generatorized.py
+++ b/ranger/ext/shutil_generatorized.py
@@ -10,7 +10,6 @@ import os
 import sys
 import stat
 from os.path import abspath
-import fnmatch
 
 __all__ = ["copyfileobj","copyfile","copymode","copystat","copy","copy2",
            "copytree","move","rmtree","Error", "SpecialFileError"]
@@ -78,14 +77,6 @@ def copyfile(src, dst):
         if fsrc:
             fsrc.close()
 
-def copymode(src, dst):
-    """Copy mode bits from src to dst"""
-    if hasattr(os, 'chmod'):
-        st = os.stat(src)
-        mode = stat.S_IMODE(st.st_mode)
-        try: os.chmod(dst, mode)
-        except: pass
-
 def copystat(src, dst):
     """Copy all stat info (mode bits, atime, mtime, flags) from src to dst"""
     st = os.stat(src)
@@ -100,21 +91,6 @@ def copystat(src, dst):
         try: os.chflags(dst, st.st_flags)
         except: pass
 
-
-def copy(src, dst, overwrite=False):
-    """Copy data and mode bits ("cp src dst").
-
-    The destination may be a directory.
-
-    """
-    if os.path.isdir(dst):
-        dst = os.path.join(dst, os.path.basename(src))
-    if not overwrite:
-        dst = get_safe_path(dst)
-    for _ in copyfile(src, dst):
-        yield
-    copymode(src, dst)
-
 def copy2(src, dst, overwrite=False, symlinks=False):
     """Copy data and all stat info ("cp -p src dst").
 
@@ -148,18 +124,6 @@ def get_safe_path(dst):
 
     return test_dst
 
-def ignore_patterns(*patterns):
-    """Function that can be used as copytree() ignore parameter.
-
-    Patterns is a sequence of glob-style patterns
-    that are used to exclude files"""
-    def _ignore_patterns(path, names):
-        ignored_names = []
-        for pattern in patterns:
-            ignored_names.extend(fnmatch.filter(names, pattern))
-        return set(ignored_names)
-    return _ignore_patterns
-
 def copytree(src, dst, symlinks=False, ignore=None, overwrite=False):
     """Recursively copy a directory tree using copy2().
 
tation of options' href='/akspecs/ranger/commit/ranger.py?h=v1.4.2&id=465bff736d234e57efb2e9232df8882f3fd3a5cb'>465bff73 ^
f027adc0 ^
f8e96a97 ^

0b5c4cbe ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36