Contents

NSWorkspace

A workspace that can launch other apps and perform a variety of file-handling services.

Declaration

class NSWorkspace

Mentioned in

Overview

There is one shared NSWorkspace object per app. You use the class method shared to access it. For example, the following statement uses an NSWorkspace object to request that a file be opened in the TextEdit app:

You can use the workspace object to:

  • Open, manipulate, and get information about files and devices.

  • Track changes to the file system, devices, and the user database.

  • Get and set Finder information for files.

  • Launch apps.

Topics

Accessing the Shared Workspace

Accessing the Workspace Notification Center

Opening URLs

Launching and Hiding Apps

Managing Open Configurations

Manipulating Files

Manipulating Uniform Type Identifier Information

Requesting Information

Setting Default Application Information

Managing Icons

Unmounting a Device

Managing the Desktop Image

Performing Finder Spotlight Searches

Finder File Labels

Tracking Changes to the File System

Requesting Additional Time Before Logout

Supporting Accessibility

Performing Privileged Operations

Responding to Environment Notifications

Deprecated

Structures

See Also

Environment