PXLoader Class Reference
| Inherits from | NSObject |
| Declared in | PXLoader.h PXLoader.m |
Overview
A PXLoader is a base loader class that lays out the foundation for each different type of loader.
Tasks
-
originTypeThe origin type either
propertyPXLoaderOriginType_FileorPXLoaderOriginType_URL -
originThe origin of the loaded data.
property -
dataThe loaded data.
property -
– initWithContentsOfFile:Creates a new loader object containing the loaded information as data. Returns
nilif the file could not be found, or the file type isn’t supported. -
– initWithContentsOfURL:Creates a new loader object containing the loaded information as data. Returns
nilif the file could not be found, or the file type isn’t supported. -
+ absolutePathFromPath:Creates the absolute path from the relative path given. If the path is already absolute, then it is just returned back.
-
+ pathForSiblingOfFile:withName:Looks for a sibling of the current file, with the given name.
-
+ pathForSiblingOfFile:withExtension:Looks for a sibling of the current file, with the same name but a different extension.
-
+ findFileAtPath:withBaseName:validExtensions:Tries to find a file at the given path with the given base name and one of the provided extensions.
Properties
Class Methods
absolutePathFromPath:
Creates the absolute path from the relative path given. If the path is already absolute, then it is just returned back.
+ (NSString *)absolutePathFromPath:(NSString *)pathParameters
- path
The relative path.
Return Value
The absolute path.
Declared In
PXLoader.mfindFileAtPath:withBaseName:validExtensions:
Tries to find a file at the given path with the given base name and one of the provided extensions.
+ (NSString *)findFileAtPath:(NSString *)basePath withBaseName:(NSString *)baseName validExtensions:(NSArray *)extensionsParameters
- basePath
The directory in which the file is to be found
- baseName
The name of the file to be found not including its extension
- extensions
Valid extensions to match against the files in basePath
Return Value
The path to the found file or nil if one couldn’t be found.
Declared In
PXLoader.mInstance Methods
initWithContentsOfFile:
Creates a new loader object containing the loaded information as data.
Returns nil if the file could not be found, or the file type
isn’t supported.
- (id)initWithContentsOfFile:(NSString *)pathParameters
- filePath
The path of the file to load. The file path may be absolute or relative to the application bundle.
Declared In
PXLoader.m