An NSWorkspace
object responds to application requests to perform a variety of services:
-
Opening, manipulating, and obtaining information about files and devices
-
Tracking changes to the file system, devices, and the user database
-
Getting and setting Finder information for files.
-
Launching applications
There is one shared NSWorkspace
object per application. You use the class method sharedWorkspace
to access it. For example, the following statement uses an NSWorkspace
object to request that a file be opened in the TextEdit application:
[[NSWorkspace sharedWorkspace] openFile:@"/Myfiles/README" |
withApplication:@"TextEdit"]; |