Part of vmc.contrib.axiom.iaxiom View In Hierarchy
Known implementations: vmc.contrib.axiom.store.AtomicFile
Method | __init__ | Create a new atomic file. |
Method | tell | Return the current offset into the file, in bytes. |
Method | write | Write some bytes to this file. |
Method | close | Close this file. Move it to its final location. |
Method | abort | Give up on this file. Discard its contents. |
Create a new atomic file.
The file will exist temporarily attempname
and be
relocated to destdir
when it is closed.
Parameters | callback | A no-argument callable which will be invoked when this file is ready to be moved to its final location. It must return the segment of the path relative to per-user storage of the owner of this file. Alternatively, a string with semantics the same as those previously described for the return value of the callable. |
Returns | A Deferred which fires with the full path to the file when it has been
closed, or which fails if there is some error closing the file.
(type: axiom.store.StoreRelativePath
) |