Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The NSWorkspace class provides a number of high-level file- and user-related functions that are only relevant within the context of a graphical application. For example, the method -[NSWorkspace iconForFile:] will return an NSImage object with the file's icon and -[NSWorkspace launchApplication:] will launch a different GUI application. This information is not available to daemons or processes that aren't running in the context of a graphical interface. So you can't use NSWorkspace in a daemon, but you can use NSFileManager. Additional file display details are available through the Launch Services API, visited at the end of this chapter. This is the kind of information that you would use javax.swing.filechooser.FileSystemView to obtain.