[Checkins]
SVN: zope.introspector/trunk/src/zope/introspector/code.txt
Update tests.
Uli Fouquet
uli at gnufix.de
Sun Aug 10 22:14:00 EDT 2008
Log message for revision 89618:
Update tests.
Changed:
U zope.introspector/trunk/src/zope/introspector/code.txt
-=-
Modified: zope.introspector/trunk/src/zope/introspector/code.txt
===================================================================
--- zope.introspector/trunk/src/zope/introspector/code.txt 2008-08-11 02:13:39 UTC (rev 89617)
+++ zope.introspector/trunk/src/zope/introspector/code.txt 2008-08-11 02:13:59 UTC (rev 89618)
@@ -209,3 +209,27 @@
>>> pnorm(file_obj.path)
'/...zope/introspector/README.txt'
+
+FileInfos
+---------
+
+``FileInfo`` objects provide the (basic) data of ``File`` objects in
+an own API. As with all `Info` objects herein we get the appropriate
+``FileInfo`` by looking up a named adapter::
+
+ >>> from zope import component
+ >>> from zope.introspector.interfaces import IInfo
+ >>> info = component.getAdapter(file_obj, IInfo, 'file')
+ >>> info
+ <zope.introspector.code.FileInfo object at 0x...>
+
+The `Info` object gives us some basic information about a file::
+
+ >>> info.getDottedName()
+ 'zope.introspector'
+
+ >>> info.getName()
+ 'README.txt'
+
+ >>> pnorm(info.getPath())
+ '/.../zope/introspector/README.txt'
More information about the Checkins
mailing list