Re: Quick way to find is a path is contained in another path?
Re: Quick way to find is a path is contained in another path?
- Subject: Re: Quick way to find is a path is contained in another path?
- From: koko <email@hidden>
- Date: Fri, 18 Mar 2011 19:15:04 -0600
BOOL isDirectory;
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:@"/Library/Users/laurent/Library" isDirectory:&isDirectory]
if(exists && isDirectory)
NSLog(@"EUREKA I have found it!");
On Mar 18, 2011, at 5:58 PM, Laurent Daudelin wrote:
> On Mar 18, 2011, at 16:43, Mike Abdullah wrote:
>
>> - (BOOL)ks_isSubpathOfPath:(NSString *)aPath
>> https://github.com/karelia/KSFileUtilities/blob/master/KSPathUtilities.h
>> Standard BSD license.
>>
>> On 18 Mar 2011, at 22:59, Laurent Daudelin wrote:
>>
>>> I have a couple of ideas using "pathComponents" but does anybody have a quick way to find if a given path is contained in another path, e.g. if "/Library/Users/laurent/Library" is contained in "/Library/Users/laurent" (in this case, it is)?
>>>
>>> -Laurent.
>
> Thanks, Mike!
>
> -Laurent.
> --
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
> Logiciels Nemesys Software email@hidden
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden