Remove the macfs module. This led to the deprecation of macostools.touched();
it completely relied on macfs and is a no-op on OS X according to code
comments.
diff --git a/Lib/plat-mac/macostools.py b/Lib/plat-mac/macostools.py
index f7ce468..fc4861e 100644
--- a/Lib/plat-mac/macostools.py
+++ b/Lib/plat-mac/macostools.py
@@ -65,21 +65,9 @@
def touched(dst):
"""Tell the finder a file has changed. No-op on MacOSX."""
- if sys.platform != 'mac': return
import warnings
- warnings.filterwarnings("ignore", "macfs.*", DeprecationWarning, __name__)
- import macfs
- file_fss = macfs.FSSpec(dst)
- vRefNum, dirID, name = file_fss.as_tuple()
- dir_fss = macfs.FSSpec((vRefNum, dirID, ''))
- crdate, moddate, bkdate = dir_fss.GetDates()
- now = time.time()
- if now == moddate:
- now = now + 1
- try:
- dir_fss.SetDates(crdate, now, bkdate)
- except macfs.error:
- pass
+ warnings.warn("macostools.touched() has been deprecated",
+ DeprecationWarning, 2)
def touched_ae(dst):
"""Tell the finder a file has changed"""
@@ -129,7 +117,6 @@
dstfsr = File.FSRef(dst)
catinfo, _, _, _ = srcfsr.FSGetCatalogInfo(Files.kFSCatInfoAllDates)
dstfsr.FSSetCatalogInfo(Files.kFSCatInfoAllDates, catinfo)
- touched(dstfss)
def copytree(src, dst, copydates=1):
"""Copy a complete file tree to a new destination"""