On 12 Apr 2011, at 20:19, Stefan Bidi wrote:
> I have the following code on a Windows machine:
>
> char buffer[3] = {'a', 'b', 'c'};
> NSString *filename = @"/c/Analyzer Data/output.csv";
> file = [NSFileHandle fileHandleForWritingAtPath: filename];
> NSLog (@"%@", file);
> [file writeData: [NSData dataWithBytes: buffer length: 3]];
>
> The file never gets created. The directory C:\Analyzer Data\ exists and is writable by the user but -fileHandleForWritingPath: returns nil (per the NSLog).
>
> This machine has the latest stable Windows binary release. Any suggestions? I'm sure I'm missing something simple, just don't know what.
The path '/c/Analyzer Data/output.csv' is a relative path on the current drive ... if your current drive is C: then it's equivalent to the absolute path 'C:/c/Analyzer Data/output.csv'