Re: Avoid changing/moving file that's currently being written.
Chris Suter <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Tue, Apr 27, 2010 at 1:20 AM, Markus Hitter <[email protected]> wrote: > Well, you can ask for a lock on the file which should be denied in case > another process has it open. See "man 2 open". Locks work on some network > shares as well. No, they're advisory locks (the same semantics as flock) so it only works if other applications use the same locking. On OS X, there is no easy way of figuring out if a file is in use. You could write a Kernel Extension (as we have done for our product). Kind regards, Chris