• 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
Re: deny share file read/write on Mac OS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deny share file read/write on Mac OS


  • Subject: Re: deny share file read/write on Mac OS
  • From: Andrew Farmer <email@hidden>
  • Date: Thu, 10 Jan 2008 01:17:56 -0800

On 10 Jan 08, at 01:02, shengjun_guan (管聲俊) wrote:
I have one application(processA) is writting one file.
And , I create another application(processB) which want to know that if processA are writting the file.
I know the Window MFC use CFile* file->open(fileName , CFile::shareDenyWrite) , it can return FALSE if the file is being written by processA.
On Mac OS side. i try some method to do it . but all false .
1. use open(fileName , O_SHLOCK , O_RDWR)
2. use FSOpenFork
3. NSFileManager


How can i do? Waiting for you help.Thanks a lot.

I found TN2037[1] in around a minute, which covers this stuff in excruciating detail. Please look for docs before you ask the mailing list!


[1]: http://developer.apple.com/technotes/tn/tn2037.html_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • RE: deny share file read/write on Mac OS
      • From: shengjun_guan (管聲俊) <email@hidden>
References: 
 >deny share file read/write on Mac OS (From: shengjun_guan (管聲俊) <email@hidden>)

  • Prev by Date: deny share file read/write on Mac OS
  • Next by Date: Re: Garbage Collection Problem
  • Previous by thread: deny share file read/write on Mac OS
  • Next by thread: RE: deny share file read/write on Mac OS
  • Index(es):
    • Date
    • Thread