Re: Folder has limited permissions.
Re: Folder has limited permissions.
- Subject: Re: Folder has limited permissions.
- From: Jean-Daniel Dupas <email@hidden>
- Date: Mon, 28 Jul 2008 09:59:28 +0200
You have to use "create and write" (-c -w)
authopen -c -w /etc/tolea.txt
And also to write some data by creating an other pipe and binding it
to the task's standard input (and then using fileHandleForWriting).
Le 28 juil. 08 à 09:46, Macarov Anatoli a écrit :
This is my code, I would give you an example.In documentation on
authopen command-w writes data in file, but I can't do it.
On 27 Jul 08, at 02:19, Macarov Anatoli wrote:
HI Andrew Farmer,
This is my cod:
NSString *command =@"/usr/libexec/authopen" ;
NSArray *args = [NSArray
arrayWithObjects:@"-w",@"/etc/
tolea.txt",nil];
NSTask *task = [[NSTask alloc] init];
NSPipe *newPipe = [NSPipe pipe];
NSFileHandle *readHandle = [newPipe fileHandleForReading];
NSData *inData;
NSString *tempString;
[task setLaunchPath:command];
[task setArguments:args];
[task setStandardOutput:newPipe];
[task setStandardError:newPipe];
[task launch];
inData = [readHandle readDataToEndOfFile];
tempString = [[NSString alloc] initWithData:inData
encoding:NSASCIIStringEncoding];
[task release];
I can't record data in the file. How to correctly do it?
Er... it might help if you tried to write some data to the file?
Copying and pasting other people's code will only get you so far if
you don't understand it.
________________________________________________________
Вы уже с Yahoo!?
Испытайте обновленную и улучшенную. Yahoo!
Почту! http://ru.mail.yahoo.com
_______________________________________________
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
_______________________________________________
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