]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
path.cat --> join
authorGuido van Rossum <guido@python.org>
Fri, 16 Aug 1991 13:28:23 +0000 (13:28 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 16 Aug 1991 13:28:23 +0000 (13:28 +0000)
Lib/dircache.py
Lib/dircmp.py
Lib/glob.py
Lib/lib-stdwin/dirwin.py
Lib/shutil.py
Lib/stdwin/dirwin.py

index b40f76e8a2cd3608f0db5ca05addb9477cfc2af9..1eebbbc61d63b50d21e95135445b59ad21a433ff 100644 (file)
@@ -32,5 +32,5 @@ opendir = listdir # XXX backward compatibility
 
 def annotate(head, list): # Add '/' suffixes to directories
        for i in range(len(list)):
-               if path.isdir(path.cat(head, list[i])):
+               if path.isdir(path.join(head, list[i])):
                        list[i] = list[i] + '/'
index 819f0bdf9f28c085aea53fcf7071966626f5f2a1..60afcdd764837b8ded5acf5a81cfb37bf7ebc852 100644 (file)
@@ -53,8 +53,8 @@ class dircmp():
                dd.common_funny = []
                #
                for x in dd.common:
-                       a_path = path.cat(dd.a, x)
-                       b_path = path.cat(dd.b, x)
+                       a_path = path.join(dd.a, x)
+                       b_path = path.join(dd.b, x)
                        #
                        ok = 1
                        try:
@@ -92,8 +92,8 @@ class dircmp():
                # The hide and ignore properties are inherited from the parent
                dd.subdirs = {}
                for x in dd.common_dirs:
-                       a_x = path.cat(dd.a, x)
-                       b_x = path.cat(dd.b, x)
+                       a_x = path.join(dd.a, x)
+                       b_x = path.join(dd.b, x)
                        dd.subdirs[x] = newdd = dircmp().new(a_x, b_x)
                        newdd.hide = dd.hide
                        newdd.ignore = dd.ignore
@@ -151,7 +151,7 @@ class dircmp():
 def cmpfiles(a, b, common):
        res = ([], [], [])
        for x in common:
-               res[cmp(path.cat(a, x), path.cat(b, x))].append(x)
+               res[cmp(path.join(a, x), path.join(b, x))].append(x)
        return res
 
 
index 8a70f0eb3a49a7f7aa3be0727cbbbfe829854625..e29095c5ef04a5df36b99a53d40fa05ce8a72f01 100644 (file)
@@ -17,7 +17,7 @@ def glob(pathname):
                result = []
                for dirname in list:
                        if basename or path.isdir(dirname):
-                               name = path.cat(dirname, basename)
+                               name = path.join(dirname, basename)
                                if path.exists(name):
                                        result.append(name)
        else:
@@ -25,7 +25,7 @@ def glob(pathname):
                for dirname in list:
                        sublist = glob1(dirname, basename)
                        for name in sublist:
-                               result.append(path.cat(dirname, name))
+                               result.append(path.join(dirname, name))
        return result
 
 def glob1(dirname, pattern):
index 0b3b5dbf7beec1ec383b573575fe19f638d84298..d0a852503697d73e521aea81402c3aa5b345b7ab 100644 (file)
@@ -11,7 +11,7 @@ import dircache
 def action(w, string, i, detail):
        (h, v), clicks, button, mask = detail
        if clicks = 2:
-               name = path.cat(w.name, string)
+               name = path.join(w.name, string)
                try:
                        w2 = anywin.open(name)
                        w2.parent = w
@@ -19,7 +19,7 @@ def action(w, string, i, detail):
                        stdwin.message('Can\'t open ' + name + ': ' + why[1])
 
 def open(name):
-       name = path.cat(name, '')
+       name = path.join(name, '')
        list = dircache.opendir(name)[:]
        list.sort()
        dircache.annotate(name, list)
index cf633967ee618069ebd5be56179c67ffc19445b6..d3521eccf006ce64d95f1b3eadca1a273cc8aa3b 100644 (file)
@@ -52,8 +52,8 @@ def copytree(src, dst):
        dot_dotdot = '.', '..'
        for name in names:
                if name not in dot_dotdot:
-                       srcname = path.cat(src, name)
-                       dstname = path.cat(dst, name)
+                       srcname = path.join(src, name)
+                       dstname = path.join(dst, name)
                        #print 'Copying', srcname, 'to', dstname
                        try:
                                #if path.islink(srcname):
index 0b3b5dbf7beec1ec383b573575fe19f638d84298..d0a852503697d73e521aea81402c3aa5b345b7ab 100755 (executable)
@@ -11,7 +11,7 @@ import dircache
 def action(w, string, i, detail):
        (h, v), clicks, button, mask = detail
        if clicks = 2:
-               name = path.cat(w.name, string)
+               name = path.join(w.name, string)
                try:
                        w2 = anywin.open(name)
                        w2.parent = w
@@ -19,7 +19,7 @@ def action(w, string, i, detail):
                        stdwin.message('Can\'t open ' + name + ': ' + why[1])
 
 def open(name):
-       name = path.cat(name, '')
+       name = path.join(name, '')
        list = dircache.opendir(name)[:]
        list.sort()
        dircache.annotate(name, list)