[Zope-CVS] CVS: Products/AdaptableStorage/gateway_fs/interfaces - IFSConnection.py:1.6

Shane Hathaway shane@zope.com
Wed, 5 Mar 2003 11:46:56 -0500


Update of /cvs-repository/Products/AdaptableStorage/gateway_fs/interfaces
In directory cvs.zope.org:/tmp/cvs-serv25709/gateway_fs/interfaces

Modified Files:
	IFSConnection.py 
Log Message:
FSConnection can now read/write files in text mode.  Next, the
gateways need to take advantage of this.


=== Products/AdaptableStorage/gateway_fs/interfaces/IFSConnection.py 1.5 => 1.6 ===
--- Products/AdaptableStorage/gateway_fs/interfaces/IFSConnection.py:1.5	Mon Feb 10 21:30:12 2003
+++ Products/AdaptableStorage/gateway_fs/interfaces/IFSConnection.py	Wed Mar  5 11:46:55 2003
@@ -32,12 +32,15 @@
         'd' (directory) and 'f' (file) are supported.
         """
 
-    def writeData(subpath, data):
+    def writeData(subpath, data, as_text=0):
         """Writes data to a filesystem node.
 
         In the case of directories, expects a tuple containing the names
         of the files that should be in the directory.  In the case of
         files, expects a string.
+
+        If as_text is true, the file is written in text mode.  The
+        as_text flag is ignored for directories.
         """
 
     def suggestExtension(subpath, ext):
@@ -55,11 +58,16 @@
         """Reads the node type of a filesystem node.
         """
 
-    def readData(subpath, allow_missing=0):
+    def readData(subpath, allow_missing=0, as_text=0):
         """Reads the data from a filesystem node.
 
-        If the allow_missing flag is specified, will return None if
-        no filesystem node is found.
+        For files, this reads the main data stream.  For directories,
+        this returns a list of names.  If the allow_missing flag is
+        specified, this method returns None if no filesystem node is
+        found.
+
+        If as_text is true, the file is read in text mode.  The
+        as_text flag is ignored for directories.
         """
 
     def getExtension(subpath):