---
title: fileURL
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uidocument/fileurl
---

# fileURL

The file URL you use to initialize the document.

## Declaration

```swift
var fileURL: URL { get }
```

## Discussion

Discussion The URL identifies the location of the document in the application sandbox. It includes the file extension, from which the file type is determined. UIKit sets this property before it calls the completion handlers of the open(completionHandler:), save(to:for:completionHandler:), and revert(toContentsOf:completionHandler:). If, outside of these methods or their completion handlers, you want to wait for any pending file operations to complete before you access this property, you can call performAsynchronousFileAccess(_:) and access the property value in the block parameter.

## See Also

### Related Documentation

- [init(fileURL:)](uikit/uidocument/init(fileurl:).md)

### Accessing document attributes

- [localizedName](uikit/uidocument/localizedname.md)
- [fileType](uikit/uidocument/filetype.md)
- [fileModificationDate](uikit/uidocument/filemodificationdate.md)
- [documentState](uikit/uidocument/documentstate.md)
- [progress](uikit/uidocument/progress.md)
