Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Version 1.0, 2003-01-14
Implementing a Cocoa GUI that wraps command-line functionality, calling a UNIX task and presenting the results in a GUI.
Carbon Project Builder 1.1 or higher, Mac OS X version 10.0 or higher
This sample shows how to implement a Cocoa GUI that wraps command-line functionality, calling out to a UNIX task and presenting the results in the GUI to the user. The Process class used for task interaction is intended to be general purpose - feel free to use/adapt it to your own applications. The command-line functionality demonstrated in this case is 'locate' - a command that builds a database of files on the system for searching, a la Sherlock. One interesting thing to note is that locate matches a given string anywhere in a path to a file, not just in the name of a file. Requirements: Project Builder 1.1 or higher, Mac OS X version 10.0 or higher Keywords: NSTask nstask UNIX process fork cocoa