How to detect busy files?
How to detect busy files?
- Subject: How to detect busy files?
- From: Lorenzo Puleo <email@hidden>
- Date: Sun, 26 May 2002 14:39:07 +0200
Hi,
how to detect when a file is busy (open by some application)?
I tried the Carbon APIs unsuccessfuly:
1 ------------
err = FSGetCatalogInfo(&sourceRef, kFSCatInfoNodeFlags, &theInfo, nil, nil,
nil);
if(err) return err;
return (theInfo.nodeFlags & kFSNodeDataOpenMask || theInfo.nodeFlags &
kFSNodeResOpenMask);// and also kFSNodeForkOpenMask
It returns always NO, even if the file is really open;
2 ------------
And also I tried:
err = PBGetCatInfoSync(&pbSource);
if(err) return YES;
return ((pbSource.hFileInfo.ioFlAttrib & kioFlAttribFileOpenMask) != 0);
It returns always NO, even if the file is really open;
Any assistance would be appreciated.
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.