[top] / zope / app / twisted / interfaces / IFileSystem
An abstract filesystem.
Opening files for reading, and listing directories, should return a producer.
All paths are POSIX paths, even when run on Windows, which mainly means that FS implementations always expect forward slashes, and filenames are case-sensitive.
IFileSystem, in generel, could be created many times per request. Thus it is not advisable to store state in them. However, if you have a special kind of IFileSystemAccess object that somhow manages an IFileSystem for each set of credentials, then it would be possible to store some state on this obejct.
There are no attributes or fields specified.
rename(old, new)
Rename a file or directory.
lsinfo(path)
Return information for a unix-style ls listing for path.
Information is returned as a dictionary containing the following keys:
type
The path type, either 'd' or 'f'.
owner_name
Defaults to "na". Must not include spaces.
owner_readable
Defaults to True.
owner_writable
Defaults to True.
owner_executable
Defaults to True for directories and False otherwise.
group_name
Defaults to "na". Must not include spaces.
group_readable
Defaults to True.
group_writable
Defaults to True.
group_executable
Defaults to True for directories and False otherwise.
other_readable
Defaults to False.
other_writable
Defaults to False.
other_executable
Defaults to True for directories and false otherwise.
mtime
Optional time, as a datetime.datetime object.
nlinks
The number of links. Defaults to 1.
size
The file size. Defaults to 0.
name
The file name.
readable(path)
Return boolean indicating whether a file at path is readable.
Return False if the file doesn't exist.
mkdir(path)
Create a directory.
If it is not possible or allowed to create the directory, an OSError should be raised describing the reason of failure.
readfile(path, outstream, start=0, end=None)
Outputs the file at path to a stream.
Data are copied starting from start. If end is not None, data are copied up to end.
remove(path)
Remove a file. Same as unlink.
If it is not possible or allowed to remove the file, an OSError should be raised describing the reason of failure.
writable(path)
Return boolean indicating whether a file at path is writable.
Note that a true value should be returned if the file doesn't exist but its directory is writable.
writefile(path, instream, start=None, end=None, append=False)
Write data to a file.
Both start and end must be either None or a non-negative integer.
If append is true, start and end are ignored.
If start or end is not None, they specify the part of the file that is to be written.
If end is None, the file is truncated after the data are written. If end is not None, any parts of the file after end are left unchanged.
Note that if end is not None, and there is not enough data in the instream it will fill the file up to end, then the missing data are undefined.
If both start is None and end is None, then the file contents are overwritten.
If start is specified and the file doesn't exist or is shorter than start, the data in the file before start file will be undefined.
If you do not want to handle incorrect starting and ending indices, you can also raise an IOError, which will be properly handled by the server.
names(path, filter=None)
Return a sequence of the names in a directory.
If filter is not None, include only those names for which filter returns a true value.
mtime(path)
Return the modification time for the file at path.
This method returns the modification time. It is assumed that the path exists. You can use the type(path) method to determine whether path points to a valid file.
If the modification time is unknown, then return None.
ls(path, filter=None)
Return a sequence of information objects.
Returm item info objects (see the ls_info operation) for the files in a directory.
If filter is not None, include only those names for which filter returns a true value.
size(path)
Return the size of the file at path.
This method returns the modification time. It is assumed that the path exists. You can use the type(path) method to determine whether path points to a valid file.
type(path)
Return the file type at path.
The return valie is 'd', for a directory, 'f', for a file, and None if there is no file at path.
This method doesn't raise exceptions.
rmdir(path)
Remove a directory.
If it is not possible or allowed to remove the directory, an OSError should be raised describing the reason of failure.
There are no specific adapters registered for this interface.
There are no extended adapters registered for this interface.
zope.viewlet.metaconfigure.JavaScriptViewlet
(name: boston.js)
zope.viewlet.manager.<ViewletManager providing IJavaScript>
(name: zope.app.boston.IJavaScript)
zope.viewlet.viewlet.SimpleViewletClass from /opt/zope/sr/apidoc/src/zope/app/boston/viewlets/toolbar/viewlet.pt
(name: toolbar)
zope.traversing.namespace.lang
(name: lang)
zope.viewlet.manager.<ViewletManager providing ICSS>
(name: zope.app.boston.ICSS)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.acquire
(name: acquire)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.viewlet.metaconfigure.CSSViewlet
(name: xmltree.css)
zope.app.pagetemplate.urlquote.URLQuote
(name: url)
zope.viewlet.viewlet.SimpleViewletClass from /opt/zope/sr/apidoc/src/zope/app/boston/viewlets/xmltree/xmltree.pt
(name: xmltree)
zope.viewlet.metaconfigure.CSSViewlet
(name: skin.css)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.default.DefaultPreferences
(name: preferences)
zope.traversing.namespace.attr
(name: attribute)
zope.traversing.namespace.attr
(name: attribute)
zope.traversing.namespace.attr
(name: attribute)
zope.traversing.namespace.attr
(name: attribute)
zope.viewlet.manager.<ViewletManager providing IHead>
(name: zope.app.boston.IHead)
zope.app.component.back35.RegistrationManagerNamespace
(name: registrations)
zope.viewlet.manager.<ViewletManager providing ILeft>
(name: zope.app.boston.ILeft)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.resource
(name: resource)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.traversing.namespace.etc
(name: etc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.traversing.namespace.acquire
(name: acquire)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.lang
(name: lang)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.traversing.namespace.item
(name: item)
zope.viewlet.metaconfigure.JavaScriptViewlet
(name: xmltree)
zope.viewlet.metaconfigure.CSSViewlet
(name: toolbar-css)
zope.traversing.namespace.adapter
(name: adapter)
zope.app.apidoc.apidoc.apidocNamespace
(name: apidoc)
zope.traversing.namespace.vh
(name: vh)
zope.traversing.namespace.vh
(name: vh)
zope.traversing.namespace.vh
(name: vh)
zope.traversing.namespace.vh
(name: vh)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.app.onlinehelp.helpNamespace
(name: help)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.adapter
(name: adapter)
zope.traversing.namespace.debug
(name: debug)
zope.traversing.namespace.debug
(name: debug)
zope.traversing.namespace.debug
(name: debug)
zope.traversing.namespace.debug
(name: debug)
zope.app.pagetemplate.talesapi.ZopeTalesAPI
(name: zope)
zope.traversing.namespace.attr
(name: attribute)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.preference.preference.preferencesNamespace
(name: preferences)
zope.app.apidoc.codemodule.browser.introspector.annotationsNamespace
(name: annotations)
zope.traversing.namespace.view
(name: view)
zope.traversing.namespace.view
(name: view)
zope.traversing.namespace.view
(name: view)
zope.traversing.namespace.view
(name: view)
zope.formlib.namedtemplate.NamedTemplatePathAdapter
(name: template)
zope.viewlet.manager.<ViewletManager providing IToolBar>
(name: zope.app.boston.IToolBar)
zope.viewlet.metaconfigure.CSSViewlet
(name: widget.css)
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.
There are no views available.