NSData's writeToFile method failing with server address

Posted by Ricky on Stack Overflow See other posts from Stack Overflow or by Ricky
Published on 2010-04-07T20:46:12Z Indexed on 2010/04/08 1:03 UTC
Read the original article Hit count: 712

Filed under:
|

Hi.

I am trying to write an NSData object to a directory like so;

[myData writeToFile:[NSString stringWithFormat:@"%@/%@.txt", path, filename] atomically:YES];

I receive no errors or warnings but I am assuming the write fails because the path variable has the format of afp://10.0.0.20/username/Desktop. I am connected to the networked share.

Do I need to modify the string or take a different approach here?

TIA, Ricky.

© Stack Overflow or respective owner

Related posts about nsdata

Related posts about cocoa