Re: How can I read an mbox file (or any simple data) in Cocoa?
Re: How can I read an mbox file (or any simple data) in Cocoa?
- Subject: Re: How can I read an mbox file (or any simple data) in Cocoa?
- From: Denis Stanton <email@hidden>
- Date: Sun, 16 Mar 2003 10:14:50 +1200
Malte
On Saturday, March 15, 2003, at 11:54 PM, Malte Tancred wrote:
>
I think there has to be a lot of APIs for reading mbox files
>
out there. Perhaps pantomime will suit your needs?
Thank you, I'll look that up.
>
> I would dearly like to find something similar in the Cocoa API.
>
>
So would I.
It looks like my best bet (at least until I check out pantomime) is to
use NSScanner
NSString *thePath =
@"/Users/me/Library/Mail/POP-myaccount/INBOX.mbox/mbox";
NSString *theWholeEnchilada = [NSString stringWithContentsOfFile:
thePath];
NSScanner *myScanner = [NSScanner scannerWithString:
theWholeEnchilada];
NSString *line;
while ([myScanner scanUpToString:@"\n" intoString: &line ]){
NSLog([NSString stringWithFormat: @"and the next line reads:
%@", line]);
}
Thank you for your help.
Denis
_______________________________________________
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.