Platforms to show: All Mac Windows Linux Cross-Platform
NSWorkspaceMBS.absolutePathForAppBundleWithIdentifier(bundleIdentifier as string) as string
Function:
Returns the absolute file-system path of an application bundle.
Notes:
bundleIdentifier: The bundle identifier string. This value corresponds to the value in the CFBundleIdentifier key of the application's Info.plist file. For example, the bundle identifier of the TextEdit application is com.apple.TextEdit.
Returns the file system path to the application bundle identified by bundleIdentifier, or "" if the bundle cannot be found.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
bundleIdentifier: The bundle identifier string. This value corresponds to the value in the CFBundleIdentifier key of the application's Info.plist file. For example, the bundle identifier of the TextEdit application is com.apple.TextEdit.
Returns the file system path to the application bundle identified by bundleIdentifier, or "" if the bundle cannot be found.
NSWorkspaceMBS.activateFileViewerSelectingFiles(Files() as folderitem)
Function:
Activates the Finder, and opens one or more windows selecting the specified files.
Example:
Notes:
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim file as FolderItem = SpecialFolder.Pictures.Child("mbs.jpg") // some file
dim w as new NSWorkspaceMBS
dim files() as FolderItem
files.Append file
// show in Finder
w.activateFileViewerSelectingFiles(files)
NSWorkspaceMBS.activateFileViewerSelectingURLs(URLs() as string)
Function:
Activates the Finder, and opens one or more windows selecting the specified files.
Notes: Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes: Available in Mac OS X v10.6 and later.
NSWorkspaceMBS.desktopImageOptionsForScreen(screen as NSScreenMBS) as dictionary
Function:
Returns the desktop image options for the given screen.
Example:
Notes:
screen: The screen for which to get the desktop image options.
Returns a dictionary containing key-value pairs. Keys can be NSWorkspaceDesktopImageScalingKey, NSWorkspaceDesktopImageAllowClippingKey or NSWorkspaceDesktopImageFillColorKey.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Example:
dim w as new NSWorkspaceMBS
dim m as NSScreenMBS = NSScreenMBS.mainScreen
dim dic as Dictionary = w.desktopImageOptionsForScreen(m)
break // check in debugger
screen: The screen for which to get the desktop image options.
Returns a dictionary containing key-value pairs. Keys can be NSWorkspaceDesktopImageScalingKey, NSWorkspaceDesktopImageAllowClippingKey or NSWorkspaceDesktopImageFillColorKey.
Available in Mac OS X v10.6 and later.
NSWorkspaceMBS.desktopImageURLForScreen(screen as NSScreenMBS) as folderitem
Function:
Returns the folderitem for the desktop image for the given screen.
Example:
Notes:
screen: The screen for which to get the desktop image.
Returns the desktop image.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Example:
dim w as new NSWorkspaceMBS
dim m as NSScreenMBS = NSScreenMBS.mainScreen
dim file as FolderItem = w.desktopImageURLForScreen(m)
MsgBox file.NativePath
screen: The screen for which to get the desktop image.
Returns the desktop image.
Available in Mac OS X v10.6 and later.
NSWorkspaceMBS.fileLabelColors as NSColorMBS()
Function:
Returns the corresponding array of file label colors for the file labels.
Example:
Notes:
This array has the same number of elements as fileLabels, and the color at a given index corresponds to the label at the same index.
You can listen for notifications named NSWorkspaceDidChangeFileLabelsNotification to be notified when file labels change which may result in changes to the order of the fileLabelColors.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim labels() as string = w.fileLabels
dim colors() as NSColorMBS = w.fileLabelColors
dim lines() as string
dim u as Integer = UBound(Colors)
for i as Integer = 0 to u
dim co as NSColorMBS = colors(i)
lines.Append labels(i)+": "+str(co.colorValue)
next
MsgBox Join(lines,EndOfLine)
This array has the same number of elements as fileLabels, and the color at a given index corresponds to the label at the same index.
You can listen for notifications named NSWorkspaceDidChangeFileLabelsNotification to be notified when file labels change which may result in changes to the order of the fileLabelColors.
Available in Mac OS X v10.6 and later.
NSWorkspaceMBS.fileLabels as string()
Function:
Returns the array of file labels as strings.
Example:
Notes:
You can listen for notifications named NSWorkspaceDidChangeFileLabelsNotification to be notified when file labels change.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim labels() as string = w.fileLabels
MsgBox Join(labels, EndOfLine)
You can listen for notifications named NSWorkspaceDidChangeFileLabelsNotification to be notified when file labels change.
Available in Mac OS X v10.6 and later.
NSWorkspaceMBS.findApplications
Function:
Examines all applications and updates the records of registered services and file types.
Example:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
NSWorkspaceMBS.findApplications
NSWorkspaceMBS.frontmostApplication as NSRunningApplicationMBS
Function:
Gets the frontmost application, which is the application that will receive key events.
Example:
Notes:
Requires Mac OS X 10.7.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim n as NSRunningApplicationMBS = w.frontmostApplication
MsgBox n.localizedName
NSWorkspaceMBS.fullPathForApplication(appname as string) as folderitem
Function:
Returns the full path for the specified application.
Example:
Notes:
The full path for the application, or nil if the specified application was not found.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
MsgBox NSWorkspaceMBS.fullPathForApplication("textedit").ShellPath
// shows /Applications/TextEdit.app
NSWorkspaceMBS.hideOtherApplications
Function:
Hides all applications other than the sender.
Example:
Notes:
The user can hide all applications except the current one by Command-Option-clicking on an application's Dock icon.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
NSWorkspaceMBS.hideOtherApplications
NSWorkspaceMBS.iconForFile(file as folderitem) as NSImageMBS
Function:
Returns an image containing the icon for the specified file.
Example:
Notes:
The returned image has an initial size of 32 pixels by 32 pixels.
Returns nil on any error.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim f as FolderItem
f=SpecialFolder.Desktop.Child("test.txt")
dim n as NSImageMBS = NSWorkspaceMBS.iconForFile(f)
n.size = new NSSizeMBS(512,512)
Backdrop=n.CopyPictureWithMask
The returned image has an initial size of 32 pixels by 32 pixels.
Returns nil on any error.
NSWorkspaceMBS.iconForFiles(files() as folderitem) as NSImageMBS
Function:
Returns an image containing the icon for the specified files.
Example:
Notes:
files: An array of folderitems, each of which contains the full path to a file.
Returns the icon associated with the group of files.
If fullPaths specifies one file, that file's icon is returned. If fullPaths specifies more than one file, an icon representing the multiple selection is returned.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim files() as FolderItem
dim folder as FolderItem = SpecialFolder.Pictures
// one file
files.Append folder.TrueItem(2)
canvas1.Backdrop = w.iconForFiles(files).CopyPictureWithMask
// two files
files.Append folder.TrueItem(3)
canvas2.Backdrop = w.iconForFiles(files).CopyPictureWithMask
// three files
files.Append folder.TrueItem(4)
canvas3.Backdrop = w.iconForFiles(files).CopyPictureWithMask
files: An array of folderitems, each of which contains the full path to a file.
Returns the icon associated with the group of files.
If fullPaths specifies one file, that file's icon is returned. If fullPaths specifies more than one file, an icon representing the multiple selection is returned.
NSWorkspaceMBS.iconForFileType(filetype as string) as NSImageMBS
Function:
Returns an image containing the icon for files of the specified type.
Example:
Notes:
filetype: The file type, which may be either a filename extension or an encoded HFS file type.
The returned image has an initial size of 32 pixels by 32 pixels.
Returns nil on any error.
Running this in a thread can lead to crashes.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
const SizeWanted = 512
const typeWanted = "txt"
dim n as NSImageMBS = NSWorkspaceMBS.iconForFileType(typeWanted)
// set size we want
n.setSize SizeWanted*2, SizeWanted*2
// make picture
dim p as Picture = n.CopyPictureWithMask
// set DPI
p.VerticalResolution = 144
p.HorizontalResolution = 144
filetype: The file type, which may be either a filename extension or an encoded HFS file type.
The returned image has an initial size of 32 pixels by 32 pixels.
Returns nil on any error.
Running this in a thread can lead to crashes.
NSWorkspaceMBS.isFilePackageAtPath(item as folderitem) as boolean
Function:
Determines whether the specified path is a file package.
Example:
Notes:
Returns true if the path identifies a file package; otherwise, false if the path does not exist, is not a directory, or is not a file package.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim file as FolderItem = SpecialFolder.Applications.Child("iTunes.app")
// shows true for iTunes
MsgBox str(w.isFilePackageAtPath(file))
NSWorkspaceMBS.launchApplication(appname as string) as boolean
Function:
Launches the specified application.
Example:
Notes:
Returns true if the application was successfully launched or was already running; otherwise, false.
The appName parameter need not be specified with a full path and, in the case of an application wrapper, may be specified with or without the .app extension, as described in "Use of .app Extension".
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
if NSWorkspaceMBS.launchApplication("Textedit") then
MsgBox "Ok"
else
MsgBox "failed"
end if
Returns true if the application was successfully launched or was already running; otherwise, false.
The appName parameter need not be specified with a full path and, in the case of an application wrapper, may be specified with or without the .app extension, as described in "Use of .app Extension".
See also:
NSWorkspaceMBS.launchApplication(appname as string, showicon as boolean, autolaunch as boolean) as boolean
Function:
Launches the specified application using additional options.
Example:
Notes:
appName: The name of the application to open.
showIcon: If false, the application's icon is not placed on the screen. (The icon still exists, though.)
autolaunch: If true, the autolaunch default is set as though the specified application were autolaunched at startup.
This method is provided to enable daemon-like applications that lack a normal user interface. Its use is not generally encouraged.
Returns true if the application is successfully launched or already running, and false if it can't be launched.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 8.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
if NSWorkspaceMBS.launchApplication("Textedit",false,false) then
MsgBox "Ok"
else
MsgBox "failed"
end if
appName: The name of the application to open.
showIcon: If false, the application's icon is not placed on the screen. (The icon still exists, though.)
autolaunch: If true, the autolaunch default is set as though the specified application were autolaunched at startup.
This method is provided to enable daemon-like applications that lack a normal user interface. Its use is not generally encouraged.
Returns true if the application is successfully launched or already running, and false if it can't be launched.
See also:
NSWorkspaceMBS.launchApplicationAtFile(file as folderitem, options as UInt32 = 0, configuration as dictionary = nil) as NSRunningApplicationMBS
Function:
Launches the app at the specified file location.
Notes:
file: The application folderitem.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
file: The application folderitem.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
See also:
NSWorkspaceMBS.launchApplicationAtFile(file as folderitem, options as UInt32, configuration as dictionary, byref error as NSErrorMBS) as NSRunningApplicationMBS
Function:
Launches the app at the specified file location.
Example:
Notes:
file: The application folderitem.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim file as FolderItem = SpecialFolder.Applications.Child("Address Book.app")
dim error as NSErrorMBS
dim configuration as new Dictionary
dim options as Integer
// today we start 32 bit version
configuration.Value(w.NSWorkspaceLaunchConfigurationArchitecture) = w.NSBundleExecutableArchitectureI386
// and hide all others
options = w.NSWorkspaceLaunchAndHideOthers
dim r as NSRunningApplicationMBS = w.launchApplicationAtFile(file, options, configuration, error)
if r = nil then
MsgBox "Error: "+error.LocalizedDescription
else
MsgBox "Started: "+r.localizedName
end if
file: The application folderitem.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
See also:
NSWorkspaceMBS.launchApplicationAtURL(URL as string, options as UInt32 = 0, configuration as dictionary = nil) as NSRunningApplicationMBS
Function:
Launches the app at the specified URL.
Notes:
url: The application URL.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
url: The application URL.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
See also:
NSWorkspaceMBS.launchApplicationAtURL(URL as string, options as UInt32, configuration as dictionary, byref error as NSErrorMBS) as NSRunningApplicationMBS
Function:
Launches the app at the specified URL.
Notes:
url: The application URL.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
url: The application URL.
options: Options to use when launching the application. see NSWorkspaceLaunch* constants.
configuration: A dictionary containing the configuration options. Possible key-value pairs are described NSWorkspaceLaunchConfiguration* functions.
error: The error is returned here.
Returns reference to newly started application.
Available in Mac OS X v10.6 and later.
See also:
NSWorkspaceMBS.launchAppWithBundleIdentifier(bundleIdentifier as string, options as Integer = &h00030000, AppleEventDescriptor as Variant = nil) as Boolean
Function:
Launches the application corresponding to the specified bundleIdentifier.
Notes:
bundleIdentifier: A bundle identifier string. This value corresponds to the value in the CFBundleIdentifier key of the application's Info.plist file. For example, the bundle identifier of the TextEdit application is com.apple.TextEdit.
options: Options to use when launching the application. Values for this parameter are described in constants.
descriptor: Additional options specified in an AppleEvent-style descriptor. For example, you could use this parameter to specify additional documents to open when the application is launched.
Returns true if the application was found and launched; otherwise, false.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
bundleIdentifier: A bundle identifier string. This value corresponds to the value in the CFBundleIdentifier key of the application's Info.plist file. For example, the bundle identifier of the TextEdit application is com.apple.TextEdit.
options: Options to use when launching the application. Values for this parameter are described in constants.
descriptor: Additional options specified in an AppleEvent-style descriptor. For example, you could use this parameter to specify additional documents to open when the application is launched.
Returns true if the application was found and launched; otherwise, false.
NSWorkspaceMBS.localizedDescriptionForType(typeName as string) as string
Function:
Returns the localized description for the specified Uniform Type Identifier.
Example:
Notes:
The localized description is suitable for displaying to the user.
Available in Mac OS X v10.5 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
MsgBox NSWorkspaceMBS.localizedDescriptionForType("public.jpeg")
// "JPEG-Bild" in German
The localized description is suitable for displaying to the user.
Available in Mac OS X v10.5 and later.
NSWorkspaceMBS.menuBarOwningApplication as NSRunningApplicationMBS
Function:
Gets the menu bar owning application, which is the application that currently owns and draws the menu bar.
Example:
Notes:
Requires Mac OS X 10.7.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim n as NSRunningApplicationMBS = w.menuBarOwningApplication
MsgBox n.localizedName
NSWorkspaceMBS.mountedLocalVolumePaths as string()
Function:
Returns the mount points of all local volumes, not just the removable ones returned by mountedRemovableMedia.
Example:
Notes:
Returns an array of strings, each of which contains the full pathname of the mount point for any local volumes.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim paths() as string = w.mountedLocalVolumePaths
MsgBox Join(paths, EndOfLine)
NSWorkspaceMBS.mountedRemovableMedia as string()
Function:
Returns the full pathnames of all currently mounted removable disks.
Example:
Notes:
Returns an array of strings, each of which contains the full pathname of a mounted removable disk.
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as new NSWorkspaceMBS
dim paths() as string = w.mountedRemovableMedia
MsgBox Join(paths, EndOfLine)
Returns an array of strings, each of which contains the full pathname of a mounted removable disk.
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.
NSWorkspaceMBS.noteFileSystemChanged
Function:
Informs the NSWorkspace object that the file system has changed.
Notes:
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.
Available in Mac OS X v10.0 and later. Deprecated in Mac OS X v10.6.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
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.
Available in Mac OS X v10.0 and later. Deprecated in Mac OS X v10.6.
See also:
NSWorkspaceMBS.noteFileSystemChanged(path as folderitem)
Function:
Informs the NSWorkspace object that the file system changed at the specified path.
Notes: 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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Notes: 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.
See also:
NSWorkspaceMBS.notificationCenter as NSNotificationCenterMBS
Function:
Returns the notification center for workspace notifications.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacCocoa Plugin | 9.7 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The items on this page are in the following plugins: MBS MacCocoa Plugin.

Links
MBS FileMaker Plugins