subdirectory
TypeScriptget subdirectory(): (string) | nullSwift declarationlet subdirectory: String?The subdirectory, if any, of the resource.
struct · iOS 16.0+ · SDK 27.1
struct URLResourceA resource located at a particular file URL within a bundle. This type is similar to ``LocalizedStringResource`` in its ability to provide access to a resource in a bundle, possibly from another process. Use the ``URL`` initializer ``URL/init(resource:)`` to resolve the resource.
get subdirectory(): (string) | nullSwift declarationlet subdirectory: String?The subdirectory, if any, of the resource.
static init(name: string, subdirectory?: (string) | null, locale?: Locale, bundle?: Bundle): URLResourceSwift declarationinit(name: String, subdirectory: String? = nil, locale: Locale = .current, bundle: Bundle = .main)Creates a URL resource from the given bundle, name, and subdirectory, optionally specifying a locale. - Parameters: - name: The name of the resource in the bundle. - subdirectory: The subdirectory, if any, of the resource. - locale: The locale of the resource. - bundle: The bundle containing the resource.
get name(): stringSwift declarationlet name: StringThe name of the resource in the bundle. The `name` property specifies both the resource name and its file extension.
get bundle(): BundleSwift declarationlet bundle: BundleThe bundle containing the resource.
get locale(): LocaleSwift declarationvar locale: LocaleThe locale of the resource.
set locale(value: Locale)Swift declarationvar locale: LocaleThe locale of the resource.
No declarations were skipped in this snapshot.