cadrumo.adapters.persistence.storage.custody._capsule_filesystem module¶
Capsule-publication filesystem primitives owned by the capsule boundary.
- remove_posix_staging_if_same(parent_fd, name, identity)[source]¶
- Return type:
- Parameters:
parent_fd (int)
name (str)
identity (stat_result)
- rename_directory_noreplace(staging, destination, *, root_handle, staging_handle=None)[source]¶
Publish exactly once; fail closed where the platform has no no-replace rename.
- rename_windows_directory_by_handle(staging_handle, destination, *, root_handle)[source]¶
Rename the exact open stage while the complete destination ancestry is locked.
The
sys.platform == "win32"block, rather than a guard at the call site or an early return, is what establishes the platform for the Windows API below: it is the only guard shape every checker this project runs narrows on, so those references resolve when the tree is analysed for a platform that does not ship them.
- write_through_windows_publication_fence(destination, *, root_handle)[source]¶
Commit the prior handle-relative rename through Windows’ supported fence.
The
sys.platform == "win32"block, rather than a guard at the call site or an early return, is what establishes the platform for the Windows API below: it is the only guard shape every checker this project runs narrows on, so those references resolve when the tree is analysed for a platform that does not ship them.
- fsync_windows_published_commit(destination)[source]¶
Use the server-backed commit record as the remote-volume durability fence.
The
sys.platform == "win32"block, rather than a guard at the call site or an early return, is what establishes the platform for the Windows API below: it is the only guard shape every checker this project runs narrows on, so those references resolve when the tree is analysed for a platform that does not ship them.
- windows_stage_snapshot(staging)[source]¶
Capture the exact transaction-owned tree before any cleanup can occur.
- remove_windows_unpublished_staging(staging, *, staging_handle, snapshot)[source]¶
Delete only entries proven unchanged while the exact stage is pinned.
- windows_mark_handle_for_deletion(handle)[source]¶
Mark the exact open handle for deletion on close.
The
sys.platform == "win32"block, rather than a guard at the call site or an early return, is what establishes the platform for the Windows API below: it is the only guard shape every checker this project runs narrows on, so those references resolve when the tree is analysed for a platform that does not ship them.