FROM : shengjun_guan (???)
DATE : Fri Jan 11 06:19:50 2008
hi,
Because i have one application to monitor one folder that files are created in.
eg. file1 and file2 have been created in the folder. My application will send the file1 and file2
to other application to open them.
In some case, file1 have been finishing created.And file2 is creating . So, if i send the tow files for
opening to other application. file2 will open fail.
So, i want to check the file2 if is busy before i send.
thanks a lot .
ann
-----Original Message-----
From: Horn Deric [mailto:<email_removed>]
Sent: 2008/1/11 [星期五] 上午 11:08
To: shengjun_guan (管聲俊)
Cc: <email_removed>
Subject: Re: How to know a file is busy(read/write)?
What are you trying to do with the file?
Even if there were a perfect API to provide detailed status of a file,
that status can change between the time you check and act on the file.
In most situations I encounter the real solution is to act on the file
and then handle the error case at that time.
Deric Horn
Application Technologies Evangelist
Apple Worldwide Developer Relations
<email_removed>
On Jan 10, 2008, at 6:24 PM, shengjun_guan (管聲俊) wrote:
> Deall all;
> I want to know a file is busy before i use it. For example, when
> you clean Tash, and some file is using, sysytem will tell you can't
> remove it. I used NSFileBusy(in NSFileManager), but it didn't
> succseful. Waiting for you help. Thanks a lot.
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Fri Jan 11 06:19:50 2008
hi,
Because i have one application to monitor one folder that files are created in.
eg. file1 and file2 have been created in the folder. My application will send the file1 and file2
to other application to open them.
In some case, file1 have been finishing created.And file2 is creating . So, if i send the tow files for
opening to other application. file2 will open fail.
So, i want to check the file2 if is busy before i send.
thanks a lot .
ann
-----Original Message-----
From: Horn Deric [mailto:<email_removed>]
Sent: 2008/1/11 [星期五] 上午 11:08
To: shengjun_guan (管聲俊)
Cc: <email_removed>
Subject: Re: How to know a file is busy(read/write)?
What are you trying to do with the file?
Even if there were a perfect API to provide detailed status of a file,
that status can change between the time you check and act on the file.
In most situations I encounter the real solution is to act on the file
and then handle the error case at that time.
Deric Horn
Application Technologies Evangelist
Apple Worldwide Developer Relations
<email_removed>
On Jan 10, 2008, at 6:24 PM, shengjun_guan (管聲俊) wrote:
> Deall all;
> I want to know a file is busy before i use it. For example, when
> you clean Tash, and some file is using, sysytem will tell you can't
> remove it. I used NSFileBusy(in NSFileManager), but it didn't
> succseful. Waiting for you help. Thanks a lot.
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| shengjun_guan (???… | Jan 11, 03:24 | |
| Horn Deric | Jan 11, 04:08 | |
| shengjun_guan (???… | Jan 11, 06:19 | |
| Alastair Houghton | Jan 11, 15:53 |






Cocoa mail archive

