NSFileManager: copy file in atomic mode?

in my iPhone projects, I am currently copying files using the method NSFileManager -copyItemAtPath:toPath:error:. However, the docs don't say anything about atomicity, so I might run into problems if my application tries to read a file that is currently being replaced with another thread. Is there a way to copy or replace a file atomically? I'm looking for something like NSData -writeDataToFilr:atomically:.

+3
source share
1 answer

How do you use NSFileManager? According to the docs , he says the following:

iOS Mac OS X v 10.5 [[NSFileManager alloc] init], singleton defaultManager. NSFileManager [[NSFileManager alloc] init].

+5

Source: https://habr.com/ru/post/1785383/


All Articles