This is NSWorkspace.rtf in view mode; [Download] [Up]
paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc. All Rights Reserved. s8 li100 fi0 ri1007 ql f0 b fs36 fs100 fs36 NSWorkspace pard s21 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSObject fs20 fs28 s12 f0 b fs24 Conforms To:tab b0 fs28 f1 NSObject (NSObject) fs20 fs28 s13 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSWorkspace.h fs20 fs28 pard s35 li100 fi0 ri1007 ql f0 b fs28 fs20 fs28 Class Description fs14 fs28 pard s2 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 An NSWorkspace object responds to application requests to perform a variety of services: fs16 fs28 pard s4 li1231 fi-376 ri1007 ql tx1231 tx2872 tx3250 'b7tab opening, manipulating, and obtaining information about files and devices fs16 fs28 'b7tab tracking changes to the file system, devices, and the user database fs16 fs28 'b7tab launching applications fs16 fs28 'b7tab miscellaneous services such as animating an image and requesting additional time before power off fs16 fs28 pard s2 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 An NSWorkspace object is made available through the b sharedWorkspaceb0 method. For example, the following statement uses an NSWorkspace object to request that a file be opened in the Edit application: fs16 fs28 pard s10 li1231 fi0 ri1007 ql f2 fs20 [[NSWorkspace sharedWorkspace] openFile:"/Myfiles/README" withApplication:"Edit"]; s35 li100 fi1130 fi0 f0 b fs28 fs48 fs28 Creating a Workspace fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 + (NSWorkspace *)b sharedWorkspaceb0 tab Returns a shared workspace. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Opening Files fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b openFile:b0 (NSString *)i fullPathi0 tab Instructs Workspace Manager to open the file specified by i fullPathi0 using the default application for its type; returns YES if file was successfully opened and NO otherwise. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b openFile:b0 (NSString *)i fullPathtab i0 Instructs Workspace Manager to open the file specified by s16 li7030 fi-6553 fi-5796 b fromImage:b0 (NSImage *)i anImagetab tab fullPathi0 using the default application for its type. To b at:b0 (NSPoint)i pointtab tab i0 provide animation prior to the open, i anImagei0 should b inView:b0 (NSView *)i aViewtab tab i0 contain the file'27s icon, and its image should be displayed ati pointi0 , usingi aViewi0 '27s coordinates. Returns YES if file was successfully opened and NO otherwise. s14 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b openFile:b0 (NSString *)i fullPathi0 tab Instructs Workspace Manager to open the file specified by s16 li7030 fi-6553 fi-5796 b withApplication:b0 (NSString *)i appNamei0 tab tab i fullPathi0 using the i appNamei0 application; returns YES if file was successfully opened and NO otherwise. s14 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b openFile:b0 (NSString *)i fullPathi0 tab Instructs Workspace Manager to open the file specified by s16 li7030 fi-6553 fi-5796 b withApplication:b0 (NSString *)i appNamei0 tab tab i fullPathi0 using the i appNamei0 application where i flag i0 b andDeactivate:b0 (BOOL)i flagi0 tab tab indicates if sending application should be deactivated before the request is sent; returns YES if file was successfully opened and NO otherwise. s14 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b openTempFile:b0 (NSString *)i fullPathi0 tab Instructs Workspace Manager to open the temporary file specified by i fullPathi0 using the default application for its type; returns YES if file was successfully opened and NO otherwise. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Manipulating Filestab fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b performFileOperation:b0 (NSString *)i operationi0 s16 li7030 fi-6553 fi-5796 b source:b0 (NSString *)i sourcei0 tab Requests the Workspace Manager to perform a file b destination:b0 (NSString *)i destinationi0 tab i tab operationi0 on a set of i filesi0 in the i sourcei0 directory b files:b0 (NSArray *)i filesi0 tab tab specifying the i destinationi0 directory if needed using i tag i0 b tag:b0 (int *)i tagi0 tab tab as an identifier for asynchronous operations; returns YES if operation succeeded and NO otherwise. s14 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b selectFile:b0 (NSString *)i fullPathi0 s16 li7030 fi-6553 fi-5796 b inFileViewerRootedAtPath:b0 (NSString *)i rootFullpath i0 tab Instructs Workspace Manager to select the file specified by i fullPathi0 opening a new file viewer if a path is specified by i rootFullpathi0 ; returns YES if file was successfully selected and NO otherwise. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Requesting Information about Files fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSString *)b fullPathForApplication:b0 (NSString *)i appName s16 li7030 fi-6553 fi-5796 i0 tab Returns the full path for the application i appNamei0 . s14 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b getFileSystemInfoForPath:b0 (NSString *)i fullPathi0 s16 li7030 fi-6553 fi-5796 b isRemovable:b0 (BOOL *)i removableFlagi0 tab Describes the file system at i fullPathi0 in i descriptioni0 and b isWritable:b0 (BOOL *)i writableFlagi0 tab tab i fileSystemTypei0 , sets the i Flagsi0 appropriately, and returns b isUnmountable:b0 (BOOL *)i unmountableFlagi0 tab tab YES if i fullPathi0 is a file system mount point, or NO if it b description:b0 (NSString **)i descriptioni0 tab tab isn'27t. b type:b0 (NSString **)i fileSystemType s14 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (BOOL)b getInfoForFile:b0 (NSString *)i fullPathi0 tab Retrieves information about the file specified by i fullPathi0 , s16 li7030 fi-6553 fi-5796 b application:b0 (NSString **)i appNamei0 tab tab sets i appNamei0 to the application the Workspace b type:b0 (NSString **)i typei0 tab tab Manager would use to open i fullPath, i0 sets i typei0 to a value or file name extension indicating the file'27s type, and returns YES upon success and NO otherwise. s14 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (NSImage *)b iconForFile:b0 (NSString *)i fullPathi0 tab Returns an NSImage with the icon for the single file specified by i fullPathi0 . fi-6552 fs16 fs28 fi-6552 - (NSImage *)b iconForFiles:b0 (NSArray *)i pathArraytab i0 Returns an NSImage with the icon for the files specified in i pathArrayi0 , an array of NSStrings. If i pathArrayi0 specifies one file, its icon is returned. If i pathArrayi0 specifies more than one file, an icon representing the multiple selection is returned. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSImage *)b iconForFileType:b0 (NSString *)i fileTypei0 tab Returns an NSImage the icon for the file type specified by i fileTypei0 . pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Tracking Changes to the File System fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b fileSystemChangedb0 tab Returns whether a change to the file system has been registered with a b noteFileSystemChangedb0 message since the last b fileSystemChangedb0 message. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b noteFileSystemChangedb0 tab Informs Workspace Manager that the file system has changed. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Updating Registered Services and File Types fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b findApplicationsb0 tab Instructs Workspace Manager to examine all applications in the normal places and update its records of registered services and file types. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Launching and Manipulating Applicationstab fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b hideOtherApplicationsb0 tab Hides all applications other than the sender. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b launchApplication:b0 (NSString *)i appNamei0 tab Instructs Workspace Manager to launch the application i appNamei0 and returns YES if application was successfully launched and NO otherwise. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b launchApplication:b0 (NSString *)i appNamei0 tab Instructs Workspace Manager to launch the application s16 li7030 fi-6553 fi-5796 b showIcon:b0 (BOOL)i showIconi0 tab tab i appNamei0 displaying the application'27s icon if i showIcon i0 b autolaunch:b0 (BOOL)i autolaunchi0 tab tab is YES and using the dock autolaunching defaults if i autolaunchi0 is YES; returns YES if application was successfully launched and NO otherwise. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Unmounting a Devicetab fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b unmountAndEjectDeviceAtPath:b0 (NSString *)i path s16 li7030 fi-6553 fi-5796 i0 tab Unmounts and ejects the device at i path i0 and returns YES if unmount succeeded and NO otherwise. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Tracking Status Changes for Devices fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b checkForRemovableMediab0 tab Causes the Workspace Manager to poll the system'27s drives for any disks that have been inserted but not yet mounted. Asks the Workspace Manager to mount the disk asynchronously and returns immediately. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSArray *)b mountNewRemovableMediab0 tab Causes the Workspace Manager to poll the system'27s drives for any disks that have been inserted but not yet mounted, waits until the new disks have been mounted, and returns a list of full pathnames to all newly mounted disks. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSArray *)b mountedRemovableMediab0 tab Returns a list of the pathnames of all currently mounted removable disks. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Notification Center fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSNotificationCenter *)b notificationCenterb0 tab Returns the notification center for WorkSpace notifications. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Tracking Changes to the User Defaults Database fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b noteUserDefaultsChangedb0 tab Informs Workspace Manager that the defaults database has changed. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b userDefaultsChangedb0 tab Returns whether a change to the defaults database has been registered with a b noteUserDefaultsChangedb0 message since the last b userDefaultsChangedb0 message. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Animating an Imagetab fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b slideImage:b0 (NSImage *)i imagei0 tab Instructs Workspace Manager to animate a sliding image of s16 li7030 fi-6553 fi-5796 b from:b0 (NSPoint)i fromPointi0 tab tab i imagei0 from i fromPointi0 to i toPointi0 , specified in screen b to:b0 (NSPoint)i toPointi0 tab tab coordinates. pard s35 li100 fi0 ri1007 ql f0 b fs48 fs28 Requesting Additional Time before Power Off or Logout fs14 fs28 pard s14 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (int)b extendPowerOffBy:b0 (int)i requestedi0 tab Requests more time before the power goes off or the user logs out; returns the granted number of additional milliseconds. fi-6552 fs16 fs28 fi-6552 }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.