b.a.AtomicFile(object) : class documentation

Part of bzrlib.atomicfile View In Hierarchy

A file that does an atomic-rename to move into place.

This also causes hardlinks to break when it's written out.

Open this as for a regular file, then use commit() to move into place or abort() to cancel.

Method __init__ Undocumented
Method __repr__ Undocumented
Method write Write some data to the file. Like file.write()
Method commit Close the file and move to final name.
Method abort Discard temporary file without committing changes.
Method close Discard the file unless already committed.
Method _close_tmpfile Close the local temp file in preparation for commit or abort
def __init__(self, filename, mode='wb', new_mode=None):
Undocumented
def __repr__(self):
Undocumented
def write(self, data):
Write some data to the file. Like file.write()
def _close_tmpfile(self, func_name):
Close the local temp file in preparation for commit or abort
def commit(self):
Close the file and move to final name.
def abort(self):
Discard temporary file without committing changes.
def close(self):
Discard the file unless already committed.
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.