NSURL: implement +fileURLWithPath:isDirectory:

Implement +[NSURL fileURLWithPath:isDirectory:], a class method added in
OSX 10.5, which was missing from the implementation.
This commit is contained in:
Daniel Ferreira 2017-06-22 06:41:10 +10:00 committed by Ivan Vučica
parent 314f437f43
commit e813dde02c
2 changed files with 9 additions and 0 deletions

View file

@ -616,6 +616,12 @@ static NSUInteger urlAlign;
return AUTORELEASE([[NSURL alloc] initFileURLWithPath: aPath]);
}
+ (id) fileURLWithPath: (NSString*)aPath isDirectory: (BOOL)isDir
{
return AUTORELEASE([[NSURL alloc] initFileURLWithPath: aPath
isDirectory: isDir]);
}
+ (NSURL*) fileURLWithPathComponents: (NSArray*)components
{
return [self fileURLWithPath: [NSString pathWithComponents: components]];