Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSWorkspaceMBS class.

Next items

NSWorkspaceMBS.noteFileSystemChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Informs the NSWorkspace object that the file system has changed.

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)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Informs the NSWorkspace object that the file system changed at the specified path.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the notification center for workspace notifications.

NSWorkspaceMBS.NSWorkspaceActiveSpaceDidChangeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when a Spaces change has occurred.
The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.
Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceApplicationKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
This constant is supplied in the userInfo dictionary of various notifications.

The value corresponding to this key is an instance of NSRunningApplication that reflects the affected application.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceCompressOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.

Compress file. This operation always returns an error.

NSWorkspaceMBS.NSWorkspaceCopyOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.
Example
Var f as FolderItem = SpecialFolder.Desktop.Child("test")
Var tag as Integer
Var files(-1) as string
Var b as Boolean
Var source,dest as FolderItem

// copies a file from one folder to another folder

source=f.Parent
files.Append f.name
dest=SpecialFolder.Pictures

b=NSWorkspaceMBS.performFileOperation(NSWorkspaceMBS.NSWorkspaceCopyOperation, source, dest, files, tag)

if b then
MsgBox "OK"
else
MsgBox "Failed"
end if

Copy file to destination.

NSWorkspaceMBS.NSWorkspaceDecompressOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.

Decompress file. This operation always returns an error.

NSWorkspaceMBS.NSWorkspaceDecryptOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.

Decrypt file. This operation always returns an error.

NSWorkspaceMBS.NSWorkspaceDesktopImageAllowClippingKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the options dictionary used with SetDesktopImageURL.

The value is a boolean, which affects the interpretation of Proportional scaling types. A false value will make the image fully visible, but there may be empty space on the sides or top and bottom. A true value will cause the image to fill the entire screen, but the image may be clipped. If this is not specified, false is assumed. Non-proportional scaling types ignore this value.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceDesktopImageFillColorKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the options dictionary used with SetDesktopImageURL.

The value is an NSColor, which is used to fill any empty space around the image. If not specified, a default value is used. Currently, only colors that use or can be converted to use NSCalibratedRGBColorSpace are supported, and any alpha value is ignored.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceDesktopImageScalingKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the options dictionary used with SetDesktopImageURL.

The value is an Number containing an NSImageScaling constant as declared in NSCell. If this is not specified, NSImageScaleProportionallyUpOrDown=3 is used. NSImageScaleProportionallyDown=0 is not currently supported.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceDestroyOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.

Destroy file.

NSWorkspaceMBS.NSWorkspaceDidActivateApplicationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the Finder is about to activate an application.
The notification object is the shared NSWorkspace instance. In Mac OS X v10.6 and later the userInfo dictionary contains the NSWorkspaceApplicationKey key with a corresponding instance of NSRunningApplication that represents the affected application.
Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidChangeFileLabelsNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the Finder file labels or colors change.
The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.
Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidDeactivateApplicationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the Finder deactivated an application.
The notification object is the shared NSWorkspace instance. In Mac OS X v10.6 and later the userInfo dictionary contains the NSWorkspaceApplicationKey key with a corresponding instance of NSRunningApplication that represents the affected application.
Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidHideApplicationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the Finder hid an application.
The notification object is the shared NSWorkspace instance. In Mac OS X v10.6 and later the userInfo dictionary contains the NSWorkspaceApplicationKey key with a corresponding instance of NSRunningApplication that represents the affected application.
Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidLaunchApplicationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when a new application has started up.
The notification object is the shared NSWorkspace instance. In Mac OS X v10.6 and later the userInfo dictionary contains the NSWorkspaceApplicationKey key with a corresponding instance of NSRunningApplication that represents the affected application.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidMountNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when a new device has been mounted.
The notification object is the shared NSWorkspace instance.

In Mac OS X v10.5 and earlier the userInfo dictionary contains a key @"NSDevicePath" that returns the path where the device was mounted, as a string.
Available in Mac OS X v10.0 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidPerformFileOperationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when a file operation has been performed in the receiving application.
The notification object is the shared NSWorkspace instance. The userInfo dictionary contains a key "NSOperationNumber" with a number containing an integer indicating the type of file operation
Available in Mac OS X v10.0 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidRenameVolumeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when a volume changes its name and/or mount path. These typically change simultaneously, in which case only one notification is posted.
The notification object is the shared NSWorkspace instance.
Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidTerminateApplicationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when an application finishes executing.
The notification object is the shared NSWorkspace instance. In Mac OS X v10.6 and later the userInfo dictionary contains the NSWorkspaceApplicationKey key with a corresponding instance of NSRunningApplication that represents the affected application.

Available in Mac OS X v10.0 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidUnhideApplicationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the Finder unhid an application.
The notification object is the shared NSWorkspace instance. In Mac OS X v10.6 and later the userInfo dictionary contains the NSWorkspaceApplicationKey key with a corresponding instance of NSRunningApplication that represents the affected application.
Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidUnmountNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the Finder did unmount a device.
This notification is delivered even if a volume was forcibly and immediately made unavailable, such as when a drive is simply unplugged.

The notification object is the shared NSWorkspace instance. The userInfo dictionary contains a key "NSDevicePath" that returns the path where the device was mounted, as a string.
Available in Mac OS X v10.0 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDidWakeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the machine wakes from sleep.
The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.
Available in Mac OS X v10.3 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceDuplicateOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.

Duplicate file in source directory.

NSWorkspaceMBS.NSWorkspaceEncryptOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.

Encrypt file. This operation always returns an error.

NSWorkspaceMBS.NSWorkspaceLaunchConfigurationAppleEvent as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the configuration dictionary for launchApplication* methods.

The value is the first NSAppleEventDescriptor to send to the new application. If an instance of the application is already running, this is sent to that application.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceLaunchConfigurationArchitecture as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the configuration dictionary for launchApplication* methods.

The value is a number containing an Mach-O Architecture constant. Ignored if a new instance of the application is not launched.
Available in Mac OS X v10.6 and later.
See NSBundleExecutableArchitecture* constants.

NSWorkspaceMBS.NSWorkspaceLaunchConfigurationArguments as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the configuration dictionary for launchApplication* methods.

The value is an NSArray of NSStrings, passed to the new application in the argv parameter. Ignored if a new instance of the application is not launched.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceLaunchConfigurationEnvironment as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the configuration dictionary for launchApplication* methods.

The value is an dictionary, mapping Strings to Strings, containing environment variables to set for the new app. Ignored if a new instance of the application is not launched.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceLinkOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.
Example
Var f as FolderItem = SpecialFolder.Desktop.Child("test")
Var tag as Integer
Var files(-1) as string
Var b as Boolean
Var source,dest as FolderItem

// creates a hard link to a file in a folder

source=f.Parent
files.Append f.name
dest=SpecialFolder.Pictures

b=NSWorkspaceMBS.performFileOperation(NSWorkspaceMBS.NSWorkspaceLinkOperation, source, dest, files, tag)

if b then
MsgBox "OK"
else
MsgBox "Failed"
end if

Create hard link to file in destination.

NSWorkspaceMBS.NSWorkspaceMoveOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.
Example
Var f as FolderItem = SpecialFolder.Desktop.Child("test")
Var tag as Integer
Var files(-1) as string
Var b as Boolean
Var source,dest as FolderItem

// moves a file from one folder to another folder

source=f.Parent
files.Append f.name
dest=SpecialFolder.Pictures

b=NSWorkspaceMBS.performFileOperation(NSWorkspaceMBS.NSWorkspaceMoveOperation, source, dest, files, tag)

if b then
MsgBox "OK"
else
MsgBox "Failed"
end if

Move file to destination.

NSWorkspaceMBS.NSWorkspaceRecycleOperation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the file operation modes.
Example
Var f as FolderItem = SpecialFolder.Desktop.Child("test")
Var tag as Integer
Var files(-1) as string
Var b as Boolean
Var source,dest as FolderItem

source=f.Parent

files.Append f.name

b=NSWorkspaceMBS.performFileOperation(NSWorkspaceMBS.NSWorkspaceRecycleOperation, source, dest, files, tag)

if b then
MsgBox "OK"
else
MsgBox "Failed"
end if

Move file to trash. The file is moved to the trash folder on the volume containing the file using the same semantics as NSWorkspaceMoveOperation. If a file with the same name currently exists in the trash folder, the new file is renamed. If no trash folder exists on the volume containing the file, the operation fails.

NSWorkspaceMBS.NSWorkspaceScreensDidSleepNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the machine's screen goes to sleep.
The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.

Few applications are likely to be interested in this notification, but they may be useful for certain hardware-based drawing decisions, for example when using OpenGL.

Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceScreensDidWakeNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the machine's screens wake.
The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.

Few applications are likely to be interested in this notification, but they may be useful for certain hardware-based drawing decisions, for example when using OpenGL.

Available in Mac OS X v10.6 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceSessionDidBecomeActiveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted after a user session is switched in. This allows an application to re-enable some processing when a switched out session gets switched back in, for example.
The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.

Available in Mac OS X v10.3 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceSessionDidResignActiveNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted before a user session is switched out. This allows an application to disable some processing when its user session is switched out, and re-enable when that session gets switched back in, for example.
The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.

If an application is launched in an inactive session, NSWorkspaceSessionDidResignActiveNotification is sent after NSApplicationWillFinishLaunchingNotification and before sending NSApplicationDidFinishLaunchingNotification.

Available in Mac OS X v10.3 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceVolumeLocalizedNameKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the userinfo dictionary for the NSWorkspaceDidRenameVolumeNotification notification.

String containing the user-visible name of the volume.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceVolumeOldLocalizedNameKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the userinfo dictionary for the NSWorkspaceDidRenameVolumeNotification notification.

String containing the old user-visible name of the volume
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceVolumeOldURLKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the userinfo dictionary for the NSWorkspaceDidRenameVolumeNotification notification.

URL containing the old mount path of the volume
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceVolumeURLKey as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the keys for the userinfo dictionary for the NSWorkspaceDidRenameVolumeNotification notification.

URL containing the mount path of the volume.
Available in Mac OS X v10.6 and later.

NSWorkspaceMBS.NSWorkspaceWillLaunchApplicationNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the Finder is about to launch an application.
The notification object is the shared NSWorkspace instance. In Mac OS X v10.6 and later the userInfo dictionary contains the NSWorkspaceApplicationKey key with a corresponding instance of NSRunningApplication that represents the affected application.

Available in Mac OS X v10.0 and later.

Some examples using this method:

NSWorkspaceMBS.NSWorkspaceWillPowerOffNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the notification names.

Posted when the user has requested a logout or that the machine be powered off.
The notification object is the shared NSWorkspace instance. This notification does not contain a userInfo dictionary.
Available in Mac OS X v10.0 and later.

Some examples using this method:

Next items

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...