---
title: "mountedVolumeURLs(includingResourceValuesForKeys:options:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/filemanager/mountedvolumeurls(includingresourcevaluesforkeys:options:)"
---

# mountedVolumeURLs(includingResourceValuesForKeys:options:)

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

## Declaration

```swift
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 doc://com.apple.foundation/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 doc://com.apple.foundation/documentation/Foundation/FileManager/VolumeEnumerationOptions.

## Return Value

Return Value An array of NSURL objects identifying the mounted volumes. important: This method returns nil on platforms other than macOS.

## Discussion

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

## See Also

### Discovering directory contents

- [contentsOfDirectory(at:includingPropertiesForKeys:options:)](foundation/filemanager/contentsofdirectory(at:includingpropertiesforkeys:options:).md)
- [contentsOfDirectory(atPath:)](foundation/filemanager/contentsofdirectory(atpath:).md)
- [enumerator(at:includingPropertiesForKeys:options:errorHandler:)](foundation/filemanager/enumerator(at:includingpropertiesforkeys:options:errorhandler:).md)
- [enumerator(atPath:)](foundation/filemanager/enumerator(atpath:).md)
- [FileManager.DirectoryEnumerator](foundation/filemanager/directoryenumerator.md)
- [FileManager.VolumeEnumerationOptions](foundation/filemanager/volumeenumerationoptions.md)
- [subpathsOfDirectory(atPath:)](foundation/filemanager/subpathsofdirectory(atpath:).md)
- [subpaths(atPath:)](foundation/filemanager/subpaths(atpath:).md)
