Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9596e3 commit 50399aeCopy full SHA for 50399ae
1 file changed
Mac/Lib/maccache.py
@@ -1,9 +1,9 @@
1
# Module 'maccache'
2
#
3
# Maintain a cache of listdir(), isdir(), isfile() or exists() outcomes.
4
+# XXX Should merge with module statcache
5
-import mac
6
-import macpath
+import os
7
8
9
# The cache.
@@ -15,7 +15,7 @@
15
16
# Current working directory.
17
18
-cwd = mac.getcwd()
+cwd = os.getcwd()
19
20
21
# Constants.
@@ -25,14 +25,14 @@
25
LISTTYPE = type([])
26
27
def _stat(name):
28
- name = macpath.join(cwd, name)
+ name = os.path.join(cwd, name)
29
if cache.has_key(name):
30
return cache[name]
31
- if macpath.isfile(name):
+ if os.path.isfile(name):
32
cache[name] = FILE
33
return FILE
34
try:
35
- list = mac.listdir(name)
+ list = os.listdir(name)
36
except:
37
cache[name] = NONE
38
return NONE
0 commit comments