mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Changes from Richard Frith-Macdonald. See ChangeLog Apr 25 01:30:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2313 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7a544f5957
commit
9e5219ee32
3 changed files with 53 additions and 0 deletions
|
@ -274,6 +274,27 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
return [[[NSBundle alloc] initWithPath: path] autorelease];
|
||||
}
|
||||
|
||||
+ (NSString *) pathForResource: (NSString *)name
|
||||
ofType: (NSString *)ext
|
||||
inDirectory: (NSString *)bundlePath
|
||||
{
|
||||
return [self pathForResource:name
|
||||
ofType:ext
|
||||
inDirectory:bundlePath
|
||||
withVersion:0];
|
||||
}
|
||||
|
||||
+ (NSString *) pathForResource: (NSString *)name
|
||||
ofType: (NSString *)ext
|
||||
inDirectory: (NSString *)bundlePath
|
||||
withVersion: (int)version
|
||||
{
|
||||
NSBundle* bundle = [NSBundle bundleWithPath:bundlePath];
|
||||
|
||||
[bundle setBundleVersion:version];
|
||||
return [bundle pathForResource:name ofType:ext inDirectory:nil];
|
||||
}
|
||||
|
||||
- initWithPath:(NSString *)path;
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
@ -671,4 +692,17 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
return _infoDict;
|
||||
}
|
||||
|
||||
- (unsigned)bundleVersion
|
||||
{
|
||||
return _version;
|
||||
}
|
||||
|
||||
/* Since I don't know how version numbers should behave - the version
|
||||
number is not used. (FIXME)
|
||||
*/
|
||||
- (void)setBundleVersion:(unsigned)version
|
||||
{
|
||||
_version = version;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue