[Zope3-checkins] CVS: Zope3/src/zope/app/fssync - syncer.py:1.27
Fred L. Drake, Jr.
fred@zope.com
Fri, 25 Jul 2003 16:18:57 -0400
Update of /cvs-repository/Zope3/src/zope/app/fssync
In directory cvs.zope.org:/tmp/cvs-serv29324/app/fssync
Modified Files:
syncer.py
Log Message:
Use a more concise and readable format for @@Zope/Entries.xml,
while still supporting loading of the XML pickle format (so
existing checkouts are still valid).
=== Zope3/src/zope/app/fssync/syncer.py 1.26 => 1.27 ===
--- Zope3/src/zope/app/fssync/syncer.py:1.26 Fri Jul 18 09:39:04 2003
+++ Zope3/src/zope/app/fssync/syncer.py Fri Jul 25 16:18:53 2003
@@ -19,17 +19,12 @@
import os
from zope.component import queryAdapter, getService
-from zope.xmlpickle import dumps, loads
-from zope.app.interfaces.fssync \
- import IObjectEntry, IObjectDirectory, IObjectFile
-
-from zope.app.interfaces.container import IContainer
-from zope.configuration.name import resolve
-from zope.app.fssync.classes import Default
+from zope.app.interfaces.fssync import IObjectDirectory, IObjectFile
+
from zope.app.traversing import getPath
from zope.app.fssync.fsregistry import getSynchronizer
-from zope.app.interfaces.file import IFileFactory
-from zope.proxy import removeAllProxies
+from zope.fssync import metadata
+
def readFile(path, mode="rb"):
f = open(path, mode)
@@ -46,10 +41,10 @@
f.close()
def loadFile(path):
- return loads(readFile(path, "r"))
+ return metadata.load_entries(readFile(path, "r"))
def dumpFile(obj, path):
- writeFile(dumps(obj), path, "w")
+ writeFile(metadata.dump_entries(obj), path, "w")
def toFS(ob, name, location):
"""Check an object out to the file system