@@ -15,11 +15,11 @@ #include "config.h" #import "OFString+PathAdditions.h" #import "OFArray.h" -#import "OFFileURLHandler.h" +#import "OFFileURIHandler.h" #import "OFOutOfRangeException.h" int _OFString_PathAdditions_reference; @@ -153,11 +153,11 @@ objc_autoreleasePoolPop(pool); return @""; } components = [components objectsInRange: - OFRangeMake(0, components.count - 1)]; + OFMakeRange(0, components.count - 1)]; ret = [OFString pathWithComponents: components]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; @@ -233,11 +233,11 @@ } if ([component isEqual: @"/"] && parent != nil && ![parent isEqual: @"/"]) { [array removeObjectsInRange: - OFRangeMake(i - 1, 2)]; + OFMakeRange(i - 1, 2)]; done = false; break; } } @@ -291,14 +291,15 @@ } - (bool)of_isDirectoryPath { return ([self hasSuffix: @"/"] || [self hasSuffix: @":"] || - [OFFileURLHandler of_directoryExistsAtPath: self]); + [OFFileURIHandler of_directoryExistsAtPath: self]); } -- (OFString *)of_pathToURLPathWithURLEncodedHost: (OFString **)URLEncodedHost +- (OFString *)of_pathToURIPathWithPercentEncodedHost: + (OFString **)percentEncodedHost { OFArray OF_GENERIC(OFString *) *components = self.pathComponents; OFMutableString *ret = [OFMutableString string]; for (OFString *component in components) { @@ -316,11 +317,12 @@ [ret makeImmutable]; return ret; } -- (OFString *)of_URLPathToPathWithURLEncodedHost: (OFString *)URLEncodedHost +- (OFString *)of_URIPathToPathWithPercentEncodedHost: + (OFString *)percentEncodedHost { OFString *path = self; if (path.length > 1 && [path hasSuffix: @"/"]) path = [path substringToIndex: path.length - 1]; @@ -349,10 +351,10 @@ } return [OFString pathWithComponents: components]; } -- (OFString *)of_pathComponentToURLPathComponent +- (OFString *)of_pathComponentToURIPathComponent { return self; } @end