Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
NSFileManager -componentsToDisplayForPath:path
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
NSFileManager -componentsToDisplayForPath:path
Subject
:
NSFileManager -componentsToDisplayForPath:path
From: Ryan Britton <
email@hidden
>
Date: Tue, 22 Nov 2005 10:08:10 -0800
I have the following in an NSFileManager category. Problem is, componentsToDisplayForPath: resolves aliases. Is this by design or is it a bug? I'm inclined to think it's a bug. If so, has anyone run into this before and come up with a work-around for it? I can process the path differently and check to see if each component is a alias, but I'd prefer not to have that additional overhead if there's a better way.
- (NSString *)displayPathForPath:(NSString *)path
{
NSEnumerator *e;
NSArray *components;
NSString *displayPath = @"";
NSString *pathComponent;
components = [self componentsToDisplayForPath:path];
if (!components) //Unable to localize path, return the raw string
{
return path;
}
e = [[self componentsToDisplayForPath:path] objectEnumerator];
while (pathComponent = [e nextObject])
{
displayPath = [displayPath stringByAppendingPathComponent:pathComponent];
}
return displayPath;
}
_______________________________________________
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
Follow-Ups
:
Re: NSFileManager -componentsToDisplayForPath:path
From:
Ryan Britton <email@hidden>
Prev by Date:
Re: low level socket
Next by Date:
Re: low level socket
Previous by thread:
Re: low level socket
Next by thread:
Re: NSFileManager -componentsToDisplayForPath:path
Index(es):
Date
Thread