mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
314f437f43
commit
e813dde02c
2 changed files with 9 additions and 0 deletions
|
@ -76,6 +76,9 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
|||
+ (NSURL*) fileURLWithPathComponents: (NSArray*)components;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
+ (id) fileURLWithPath: (NSString*)aPath isDirectory: (BOOL)isDir;
|
||||
#endif
|
||||
/**
|
||||
* Create and return a URL with the supplied string, which should
|
||||
* be a string (containing percent escape codes where necessary)
|
||||
|
|
|
@ -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]];
|
||||
|
|
Loading…
Reference in a new issue