testing for open files or volumes
testing for open files or volumes
- Subject: testing for open files or volumes
- From: Alex Reynolds <email@hidden>
- Date: Tue, 3 Dec 2002 01:36:31 -0500
I was wondering if there are ways to test whether a file is open by
another process under Darwin (and by extension Mac OS X)?
I have been testing out methods that use the functions:
-- flock()
-- lockf()
-- fcntl()
and Carbon methods that look at a catalog's nodeFlags against the
kFSNodeLockedMask constant.
None of these seem to return any positive indication that a file is
open elsewhere in the OS.
I was also curious about whether there is a way to determine if a
volume is busy. There is a DiskImages framework that man pages for
hdiutil hint at, but this framework appears to be private and so I
don't know how to call any functions it might use to return whether
this condition is true or not.
Has anyone run into this sort of thing before and found a solution?
Thanks,
Alex
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.