22
22
You should have received a copy of the GNU Library General Public
23
23
License along with this library; if not, write to the Free
24
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
24
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
27
27
#ifndef __NSBundle_h_GNUSTEP_BASE_INCLUDE
171
171
withVersion: (int)version;
174
* Init the bundle for reading resources from path. path must be an
175
* absolute path to a directory on disk. If path is nil or doesn't
176
* exist, initWithPath: returns nil. If a bundle for that path
177
* already existed, it is returned in place of the receiver (and the
178
* receiver is deallocated).
174
* Init the bundle for reading resources from path.<br />
175
* The MacOS-X documentation says that the path must be a full path to
176
* a directory on disk. However, it (in MacOS-X) version 10.3 at least)
177
* actually accepts relative paths too.<br />
178
* The GNUstep behavior is similar in that it accepts a relative path,
179
* but GNUstep converts it to an absolute path by referring to the
180
* current working directory when the is initialised, so an absolute
181
* path is then used and a warning message is printed.<br />
182
* On MacOS-X using a bundle initialised with a relative path will cause
183
* a crash if the current working directory is changed between the point
184
* at which the bundle was initialised and that at which it is used.<br />
185
* If path is nil or can't be accessed, initWithPath: reallocates the
186
* receiver and returns nil.<br />
187
* If a bundle for that path already existed, it is returned in place
188
* of the receiver (and the receiver is deallocated).
180
190
- (id) initWithPath: (NSString*)path;
196
206
- (Class) principalClass;
199
* Not implemented. Create an instance and call the corresponding instance
209
<p> Returns an array of paths for all resources with the specified
210
extension and residing in the bundlePath directory. bundlePath can
211
be any type of directory structure, but typically it is used to
212
search for resources in a application or framework. For example,
213
one could search for tiff files in the MyApp.app application using [NSBundle
214
pathsForResourcesOfType: @"tiff" inDirectory: @"MyApp.app"]. It
215
will search in any Resources subdirectory inside bundlePath as well
216
as the main directory for resource files. If extension is nil or
217
empty, all resources are returned. </p>
202
219
+ (NSArray*) pathsForResourcesOfType: (NSString*)extension
203
220
inDirectory: (NSString*)bundlePath;
219
236
in the following order:
222
root path/Resources/bundlePath
223
root path/Resources/bundlePath/"language.lproj"
225
root path/bundlePath/"language.lproj"
239
root path/Resources/subPath
240
root path/Resources/subPath/"language.lproj"
242
root path/subPath/"language.lproj"
228
245
where language.lproj can be any localized language directory inside
289
306
forPreferences: (NSArray *)preferencesArray;
291
308
- (BOOL) isLoaded;
311
This method returns the same information as
312
-pathsForResourcesOfType:inDirectory: except that only non-localized
313
resources and resources that match the localization localizationName
295
316
- (NSArray*) pathsForResourcesOfType: (NSString*)extension
296
inDirectory: (NSString*)bundlePath
317
inDirectory: (NSString*)subPath
297
318
forLocalization: (NSString*)localizationName;
299
320
* Not implemented.
301
322
- (NSString*) pathForResource: (NSString*)name
302
323
ofType: (NSString*)ext
303
inDirectory: (NSString*)bundlePath
324
inDirectory: (NSString*)subPath
304
325
forLocalization: (NSString*)localizationName;
306
327
/** Returns the info property list associated with the bundle. */