<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileManager/mountedVolumeURLs(includingResourceValuesForKeys:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileManager(im)mountedVolumeURLsIncludingResourceValuesForKeys:options:"
  },
  "title" : "mountedVolumeURLs(includingResourceValuesForKeys:options:)"
}
-->

# mountedVolumeURLs(includingResourceValuesForKeys:options:)

Returns an array of URLs that identify the mounted volumes available on the device.

```
func mountedVolumeURLs(includingResourceValuesForKeys propertyKeys: [URLResourceKey]?, options: FileManager.VolumeEnumerationOptions = []) -> [URL]?
```

## Parameters

`propertyKeys`

An array of keys that identify the file properties that you want pre-fetched for each volume. For each returned URL, the values for these keys are cached in the corresponding [`NSURL`](/documentation/Foundation/NSURL) objects. You may specify `nil` for this parameter. For a list of keys you can specify, see Common File System Resource Keys.

`options`

Option flags for the enumeration. For a list of possible values, see [`FileManager.VolumeEnumerationOptions`](/documentation/Foundation/FileManager/VolumeEnumerationOptions).

## Return Value

An array of `NSURL` objects identifying the mounted volumes.

> Important:
> This method returns `nil` on platforms other than macOS.

## Discussion

This call may block if I/O is required to determine values for the requested `propertyKeys`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)