Deprecated NSWorkspace Methods
A method identified as deprecated has been superseded and may become unsupported in the future.
Deprecated in OS X v10.6
checkForRemovableMedia
Polls the system’s drives for any disks that have been inserted but not yet mounted. (Deprecated in OS X v10.6.)
Discussion
This method doesn’t wait until such disks are mounted; instead, it requests that the disk be mounted asynchronously and returns immediately. Currently has no effect.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
Declared In
NSWorkspace.hfileSystemChanged
Returns a Boolean value indicating whether a change to the file system has been registered with a noteFileSystemChanged message since the last fileSystemChanged message. (Deprecated in OS X v10.6.)
Return Value
Currently, this method always returns NO.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
Declared In
NSWorkspace.hfindApplications
Examines all applications and updates the records of registered services and file types. (Deprecated in OS X v10.6.)
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
Declared In
NSWorkspace.hmountNewRemovableMedia
Returns the full pathnames of any newly mounted disks. (Deprecated in OS X v10.6.)
Return Value
An array of NSString objects, each of which contains the full pathname to a newly mounted disk.
Discussion
This method polls the system’s drives for any disks that have been inserted but not yet mounted and waits until the new disks have been mounted. This method posts an NSWorkspaceDidMountNotification to the NSWorkspace object’s notification center when it is finished. Currently provides the same functionality as mountedRemovableMedia.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
Declared In
NSWorkspace.hnoteFileSystemChanged
Informs the NSWorkspace object that the file system has changed. (Deprecated in OS X v10.6.)
Discussion
The NSWorkspace object then gets the status of all the files and directories it is interested in and updates itself appropriately. This method is used by many objects that write or delete files.
The NSDocument and NSSavePanel objects use this method when saving a file. If you create a file directly, you should call noteFileSystemChanged so that the Finder can update the folder if it is open.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
See Also
Declared In
NSWorkspace.hnoteUserDefaultsChanged
Informs the NSWorkspace object that the defaults database has changed. (Deprecated in OS X v10.6.)
Discussion
The NSWorkspace object then reads all the defaults it is interested in and reconfigures itself appropriately. For example, this method is used by the Preferences application to notify the Finder whether the user prefers to see hidden files. Currently has no effect.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
See Also
Declared In
NSWorkspace.hopenTempFile:
Opens the specified temporary file using the default application for its type. (Deprecated in OS X v10.6.)
Parameters
- fullPath
The full path to the temporary file.
Return Value
YES if the file was successfully opened; otherwise, NO.
Discussion
The sending application is deactivated before the request is sent. Using this method instead of one of the openFile:... methods lets the receiving application know that it should delete the file when it no longer needs it. Currently provides the same functionality as openFile:.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
See Also
Declared In
NSWorkspace.hslideImage:from:to:
Animates a sliding image from one point to another. (Deprecated in OS X v10.6.)
Parameters
- image
The image to animate.
- fromPoint
The starting point, in screen coordinates.
- toPoint
The ending point, in screen coordinates.
Discussion
Currently unimplemented.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
Declared In
NSWorkspace.huserDefaultsChanged
Returns a Boolean value indicating whether a change to the defaults database has been registered with a noteUserDefaultsChanged message since the last userDefaultsChanged message. (Deprecated in OS X v10.6.)
Return Value
Currently, this method always returns NO.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.6.
Declared In
NSWorkspace.hDeprecated in OS X v10.7
activeApplication
Returns a dictionary with information about the current active application. (Deprecated in OS X v10.7.)
Return Value
A dictionary with information about the application. The dictionary contains as many of the keys described in Table 1 as are available.
Special Considerations
It is strongly suggested that you use the NSRunningApplication classes’ currentApplication or activemethods to retrieve this information in applications targeted for OS X v10.6 and later.
Availability
- Available in OS X v10.2 and later.
- Deprecated in OS X v10.7.
Declared In
NSWorkspace.hlaunchedApplications
Returns an array of dictionaries, one entry for each running application. (Deprecated in OS X v10.7.)
Return Value
An array of NSDictionary objects. Each dictionary contains as many of the keys described in Table 1 as are available.
Special Considerations
It is strongly suggested that you use the NSWorkspace runningApplications method and the NSRunningApplication class to retrieve this information in applications targeted for OS X v10.6 and later.
Availability
- Available in OS X v10.2 and later.
- Deprecated in OS X v10.7.
See Also
Declared In
NSWorkspace.hmountedLocalVolumePaths
Returns the mount points of all local volumes, not just the removable ones returned by mountedRemovableMedia. (Deprecated in OS X v10.7.)
Return Value
An array of NSString objects, each of which contains the full pathname of the mount point for any local volumes.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.7.
Declared In
NSWorkspace.hmountedRemovableMedia
Returns the full pathnames of all currently mounted removable disks. (Deprecated in OS X v10.7.)
Return Value
An array of NSString objects, each of which contains the full pathname of a mounted removable disk.
Discussion
If the computer provides an interrupt or other notification when the user inserts a disk into a drive, the Finder will mount the disk immediately. However, if no notification is given, the Finder won’t be aware that a disk needs to be mounted. On such systems, an application should invoke either mountNewRemovableMedia or checkForRemovableMedia before invoking mountedRemovableMedia. Either of these methods cause the Finder to poll the drives to see if a disk is present. If a disk has been inserted but not yet mounted, these methods will cause the Finder to mount it.
The Disk button in an Open or Save panel invokes mountedRemovableMedia and mountNewRemovableMedia as part of its operation, so most applications won’t need to invoke these methods directly.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.7.
Declared In
NSWorkspace.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)