Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > how relize "share deny" file read/write

how relize "share deny" file read/write
Thread Tools
yesea
Fresh-Faced Recruit
Join Date: Oct 2004
Status: Offline
Reply With Quote
Jan 10, 2008, 06:04 AM
 
Hi all,

I have one application (processA) are writting one file.
And, i create another appliction (processB) who want to check the file if it's busy. I know on Window MFC side. I can use CFile* file->open(fileName,shareDenyWrite),if the function return 0,that mean the file is busy(processA is wrintting the file). But on Mac OS side. i try find some method, all fail.

1. use C : open(fileName, O_RDWR, O_EXLOCK);
2. use coreCarbon: FSOpenFork
3. use Cocoa: NSFileManager.

How can do? Any reply are welcome. thanks!!!

Ann
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jan 10, 2008, 12:16 PM
 
I haven't done this before myself, but Google turns up a pretty extensive technote on the subject.
( Last edited by Chuckit; Jan 10, 2008 at 12:39 PM. )
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:49 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,