pub struct AtomicFileOperations;Expand description
Atomic file operations handler
Implementations§
Source§impl AtomicFileOperations
impl AtomicFileOperations
Sourcepub fn atomic_copy_file(
&self,
source: &Path,
destination: &Path,
) -> NativeResult<()>
pub fn atomic_copy_file( &self, source: &Path, destination: &Path, ) -> NativeResult<()>
Perform atomic file copy from source to destination
Requirements:
- Source must exist and be a file (not directory)
- Destination must not exist (overwrite protection)
- Uses temporary file + rename for atomicity
- Full fsync discipline for crash safety
- Cleanup on any failure
§Failing TDD Tests Expected:
- test_atomic_copy_file_to_new_location
- test_atomic_copy_rejects_directory
- test_atomic_copy_overwrite_protection
- test_atomic_copy_crash_safety_simulation
Auto Trait Implementations§
impl Freeze for AtomicFileOperations
impl RefUnwindSafe for AtomicFileOperations
impl Send for AtomicFileOperations
impl Sync for AtomicFileOperations
impl Unpin for AtomicFileOperations
impl UnwindSafe for AtomicFileOperations
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more