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

Shane Hathaway shane@zope.com
Mon, 10 Feb 2003 21:30:47 -0500


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

Modified Files:
	IFSConnection.py 
Log Message:
- FSConnection provides a mechanism for stripping extensions in Zope,
but when this mechanism was employed, AdaptableStorage reverted to
loading the objects as simple files.  Now it sees the extension
and the objects are loaded using the preferred class.

- Added docstrings to IFSConnection.



=== Products/AdaptableStorage/gateway_fs/interfaces/IFSConnection.py 1.4 => 1.5 ===
--- Products/AdaptableStorage/gateway_fs/interfaces/IFSConnection.py:1.4	Tue Jan  7 14:09:40 2003
+++ Products/AdaptableStorage/gateway_fs/interfaces/IFSConnection.py	Mon Feb 10 21:30:12 2003
@@ -24,20 +24,44 @@
     """
 
     def writeSection(subpath, section_name, data):
-        ""
+        """Writes a text-based metadata section for a filesystem node."""
 
     def writeNodeType(subpath, data):
-        ""
+        """Writes the node type for a filesystem node.
+
+        'd' (directory) and 'f' (file) are supported.
+        """
 
     def writeData(subpath, data):
-        ""
+        """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.
+        """
+
+    def suggestExtension(subpath, ext):
+        """Suggests a filename extension for a filesystem node.
+
+        The IFSConnection may use this information to store the file
+        with an automatically appended filename extension.
+        """
 
     def readSection(subpath, section_name, default=None):
-        ""
+        """Reads a text-based metadata section.
+        """
 
     def readNodeType(subpath):
-        ""
+        """Reads the node type of a filesystem node.
+        """
 
     def readData(subpath, allow_missing=0):
-        ""
+        """Reads the data from a filesystem node.
 
+        If the allow_missing flag is specified, will return None if
+        no filesystem node is found.
+        """
+
+    def getExtension(subpath):
+        """Returns the filename extension used for a filesystem node.
+        """