MCPcopy
hub / github.com/borgbackup/borg / close

Method close

src/borg/platform/base.py:206–219  ·  view source on GitHub ↗

sync() and close.

(self)

Source from the content-addressed store, hash-verified

204 safe_fadvise(self.fd, 0, 0, "DONTNEED")
205
206 def close(self):
207 """sync() and close."""
208 if self.f.closed:
209 return
210 from .. import platform
211
212 dirname = None
213 try:
214 dirname = Path(self.path).parent
215 self.sync()
216 finally:
217 self.f.close()
218 if dirname:
219 platform.sync_dir(dirname)
220
221
222class SaveFile:

Callers 15

__exit__Method · 0.95
__exit__Method · 0.45
dir_is_cachedirFunction · 0.45
readMethod · 0.45
writeMethod · 0.45
_daemonizeFunction · 0.45
create_filter_processFunction · 0.45
sync_dirFunction · 0.45
__exit__Method · 0.45
_export_tarMethod · 0.45
_import_tarMethod · 0.45

Calls 1

syncMethod · 0.95

Tested by 9

open_dirFunction · 0.36
test_disposeMethod · 0.36
are_acls_workingFunction · 0.36
has_noatimeFunction · 0.36
test_unix_socketFunction · 0.36
fifo_feederFunction · 0.36
get_sparsemap_fhFunction · 0.36