Re: [NSFileHandle isOpen]?
Re: [NSFileHandle isOpen]?
- Subject: Re: [NSFileHandle isOpen]?
- From: claw <email@hidden>
- Date: Mon, 14 Feb 2011 17:57:03 +0100
don't know exactly, i am not an expert enough but i saw structure & methods in headers like:
<kernel/mach/policy.h>
<kernel/sys/file.h>
int file_flags(int, int *);
i don't know how to use them exactly but if you send an closedFile, and you can determine that this file is time consuming after sending the message in process or it is still used with another pid, ppid that also means it can effectively forbid / or prevent the close action
yes ? no ? out of subject ??
Le 14 févr. 2011 à 17:33, Programmingkid a écrit :
> On Feb 14, 2011, at 10:36 AM, email@hidden wrote:
>
>>>>>
>>>>> Is there a way to determine if a NSFileHandle object has been sent a closeFile message?
>>>
>>
>> and what about implement your own method like:
>> -(void)sendActionToFile: actualState:(NSDictionary *)userInfo;
>>
>> 'userInfo' is a dictionary filled with state information just before using NSFileHandle
>> in order to test if there is still events in waiting associated with this file
>> of course ,you can determine in advance that you already sent twice closeFile , if nothing happened there is a problem.... so first you can send the message with cocoa, second why not asking the kernel why the file refuse to be closed (already a user reading & writting on it ? policy associated with the file ? and so on !).
>
> What method do you suggest I use to ask the kernel these things?
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden