Contents

beginObservingDirectory(at:)

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

Declaration

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.

See Also

Managing Badges, Shortcut Menus, and Toolbar Buttons