---
title: "beginObservingDirectory(at:)"
framework: Finder Sync
role: symbol
role_heading: Instance Method
platforms: [macOS 10.10+]
path: "findersync/fifindersyncprotocol/beginobservingdirectory(at:)"
---

# beginObservingDirectory(at:)

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

## Declaration

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

## Parameters

- `url`: The URL of the directory.

## Discussion

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.

## See Also

### Managing Badges, Shortcut Menus, and Toolbar Buttons

- [endObservingDirectory(at:)](findersync/fifindersyncprotocol/endobservingdirectory(at:).md)
- [menu(for:)](findersync/fifindersyncprotocol/menu(for:).md)
- [requestBadgeIdentifier(for:)](findersync/fifindersyncprotocol/requestbadgeidentifier(for:).md)
- [toolbarItemImage](findersync/fifindersyncprotocol/toolbaritemimage.md)
- [toolbarItemName](findersync/fifindersyncprotocol/toolbaritemname.md)
- [toolbarItemToolTip](findersync/fifindersyncprotocol/toolbaritemtooltip.md)
