Home | Trees | Index | Help |
|
---|
Package twisted :: Package persisted :: Module dirdbm :: Class Shelf |
|
DirDBM
--+
|
Shelf
A directory with a DBM shelf interface.
This class presents a hash-like interface to a directory of small, flat files. Keys must be strings, but values can be any given object.Method Summary | |
---|---|
dirdbm[foo] Get and unpickle the contents of a file in
this directory. | |
shelf[foo] = bar Create or modify a textfile in this
directory. | |
Inherited from DirDBM | |
| |
key in dirdbm | |
del dirdbm[foo] Delete a file in this directory. | |
Return the number of key/value pairs in this Shelf | |
Decode a filename to get the key. | |
Encode a key so it can be used as a filename. | |
Read in the contents of a file. | |
Write data to a file. | |
Delete all key/value pairs in this dirdbm. | |
Close this dbm: no-op, for dbm-style interface compliance. | |
DirDBM
|
Copy the contents of this dirdbm to the dirdbm at path . |
Return the value associated with key or default if
not self.has_key(key) | |
Returns modification time of an entry. | |
Return a true value if this dirdbm has the specified key, a faluse value otherwise. | |
Return a list of 2-tuples containing key/value pairs. | |
Return a list of filenames (keys). | |
| |
Add all the key/value pairs in dict to this dirdbm. | |
Return a list of file-contents (values). |
Method Details |
---|
__getitem__(self,
k)
|
__setitem__(self,
k,
v)
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:08:32 2004 | http://epydoc.sf.net |