<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FinderSync",
  "identifier" : "/documentation/FinderSync/FIFinderSyncProtocol/beginObservingDirectory(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Finder Sync"
    ],
    "preciseIdentifier" : "c:objc(pl)FIFinderSync(im)beginObservingDirectoryAtURL:"
  },
  "title" : "beginObservingDirectory(at:)"
}
-->

# beginObservingDirectory(at:)

Tells the extension that the user is looking at a monitored directory or at
one of its subdirectories.

```
optional func beginObservingDirectory(at url: URL)
```

## Parameters

`url`

The URL of the directory.

## Discussion

Override this method to receive notifications when the user opens the
contents of a monitored directory or one of its subdirectories in the
Finder. The system calls `beginObservingDirectoryAtURL:` only once for each
unique URL. As long as the content remains visible in at least one Finder
window, any additional Finder windows that open to the same URL are ignored.

> Note: The system creates additional instances of your extension for any
> Open and Save dialogs. These extensions receive their own calls to
> `beginObservingDirectoryAtURL:`, even if the directory is already open in a
> Finder window.

---

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)