Re: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
Re: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
- Subject: Re: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
- From: Nir Soffer <email@hidden>
- Date: Tue, 22 Aug 2006 16:07:43 +0300
Why do you need this strange code - replace "/" with ":" or replace
":" with "/"?
How the relative path get into the system? Do you let user to type
path in a text field?
On Aug 22, 2006, at 3:11 PM, Alan Smith wrote:
- (NSString *)fullPath
{
int replacements = 0;
NSMutableString *string = [NSMutableString stringWithCapacity:
[relativePath length]];
[string setString: relativePath];
replacements = [string replaceOccurrencesOfString: @"/"
withString: @":" options: NSLiteralSearch range: NSMakeRange(0,
[relativePath length])];
if (replacements < 1)
[string replaceOccurrencesOfString: @":" withString: @"/"
options: NSLiteralSearch range: NSMakeRange(0, [relativePath
length])];
return [parent stringByAppendingPathComponent: string];
}
Best Regards,
Nir Soffer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden