diff options
Diffstat (limited to 'test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers.m')
-rw-r--r-- | test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers.m | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers.m b/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers.m deleted file mode 100644 index cac24a636a..0000000000 --- a/test/ios/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// OHPathHelpers.m -// Pods -// -// Created by Olivier Halligon on 18/04/2015. -// -// - -#import "OHPathHelpers.h" - -NSString* OHPathForFile(NSString* fileName, Class inBundleForClass) -{ - NSBundle* bundle = [NSBundle bundleForClass:inBundleForClass]; - return OHPathForFileInBundle(fileName, bundle); -} - -NSString* OHPathForFileInBundle(NSString* fileName, NSBundle* bundle) -{ - return [bundle pathForResource:[fileName stringByDeletingPathExtension] - ofType:[fileName pathExtension]]; -} - -NSString* OHPathForFileInDocumentsDir(NSString* fileName) -{ - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *basePath = (paths.count > 0) ? [paths objectAtIndex:0] : nil; - return [basePath stringByAppendingPathComponent:fileName]; -} - -NSBundle* OHResourceBundleForClass(NSString* bundleBasename, Class inBundleForClass) -{ - NSBundle* classBundle = [NSBundle bundleForClass:inBundleForClass]; - return [NSBundle bundleWithPath:[classBundle pathForResource:bundleBasename - ofType:@"bundle"]]; -}
\ No newline at end of file |