• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to detect busy files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: How to detect busy files?
      • From: Brendan Younger <email@hidden>
    • Re: How to detect busy files?
      • From: Ondra Cada <email@hidden>
  • Prev by Date: How to lock NIB files?
  • Next by Date: Re: displaying a calculated image
  • Previous by thread: Re: How to lock NIB files?
  • Next by thread: Re: How to detect busy files?
  • Index(es):
    • Date
    • Thread