---
title: URLResource
framework: foundation
role: symbol
role_heading: Structure
path: foundation/urlresource
---

# URLResource

A resource located at a particular file URL within a bundle.

## Declaration

```swift
struct URLResource
```

## Overview

Overview 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 init(resource:) to resolve the resource.

## Topics

### Creating a URL resource

- [init(name:subdirectory:locale:bundle:)](foundation/urlresource/init(name:subdirectory:locale:bundle:).md)

### Accessing resource properties

- [bundle](foundation/urlresource/bundle.md)
- [name](foundation/urlresource/name.md)
- [subdirectory](foundation/urlresource/subdirectory.md)
- [locale](foundation/urlresource/locale.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Localization

- [Locale](foundation/locale.md)
- [NSOrthography](foundation/nsorthography.md)
- [NSLocalizedString(_:tableName:bundle:value:comment:)](foundation/nslocalizedstring(_:tablename:bundle:value:comment:).md)
- [LocalizedStringResource](foundation/localizedstringresource.md)
- [CustomLocalizedStringResourceConvertible](foundation/customlocalizedstringresourceconvertible.md)
