Re: Cannot get the content of a file (in iPhoto Library)
Re: Cannot get the content of a file (in iPhoto Library)
- Subject: Re: Cannot get the content of a file (in iPhoto Library)
- From: Tito Ciuro <email@hidden>
- Date: Thu, 18 Sep 2003 15:52:39 +0200
Jean,
On jueves, sept 18, 2003, at 15:23 Europe/Paris, Jean Bovet wrote:
>
I'm trying to read the content of every iPhoto library image with the
>
[NSFileHandle fileHandleForReadingAtPath:]. Everything works well
>
except for some file which I cannot get the content (the method
>
returns a NULL value). I have checked the file permission and I have
>
added some line of code before reading the file (with the following
>
results):
>
>
- +[NSFileManager fileExistsAtPath:] returns YES.
>
- +[NSFileManager isReadableFileAtPath:] returns YES.
>
- +[NSFileManager contentsAtPath:] returns NO !!
>
>
The last call returns NO. I don't understand why ? Has anybody an idea
>
about this problem ?
I guess you mean that nil is returned, right? From the docs,
NSFileManager:
contentsAtPath:
- ( NSData *) contentsAtPath: (NSString *) path
Returns the contents of the file specified in path as an NSData object.
If path specifies a directory, or if some other error occurs, this
method returns nil .
Try NSImage - (id) initWithContentsOfFile: (NSString *) filename and
see whether this helps.
-- Tito
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.