This is MiscFileFinder.h in view mode; [Download] [Up]
/*============================ MiscFileFinder.h ==========================*/
// Written by Dale Amon, copyright 1994 by Genesis Project, Ltd.
// Version 0.8. All rights reserved.
//
// This notice may not be removed from this source code.
//
// This object is included in the MiscKit by permission from the author
// and its use is governed by the MiscKit license, found in the file
// "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
// for a list of all applicable permissions and restrictions.
//
/* Class for finding files of a defined type, where ever they may be. Uses
not only NeXT Workspace manager search, but also searches user specified
environment variable that can be changed at run time and a programmer
specified compile time default path. This allows a series of overrides or
fallbacks:
1) Run time specification
2) Compile time defaults
3) Workspace manager's path
Files can be selected by name and restricted to matches with the correct
mode mask, ie readable, executable...
HISTORY
18-Sep-93 Dale Amon at GPL
Created. Split some portions off RemoteApplication class to create
a general means of finding files with a particular type, regardless
of location.
*/
#define MISC_FILEFINDER_VERSION_ID 0.8
@interface MiscFileFinder : Object
{ const char *typeName; /* Name of the type object */
const char *defaultPath; /* Default path for this type */
const char *pathVariable; /* Environment PATH variable name */
int fileMode; /* Required attributes of file type:
R_OK, X_OK, etc */
char *pathTmp; /* Temp to hold result of current search */
}
+ initialize;
+ (BOOL) debug;
+ setDebug: (BOOL) flg;
+ findFileTypeNamed: (const char*) aKey;
- free;
- init;
- initName: (const char *) name
defaultPath: (const char *) path
pathVariable: (const char *) var
mode: (int) fmode;
- (char *) fullPathForFile: (const char *) filename;
- (BOOL) setTypeName: (const char*) name;
- setDefaultPath: (const char*) path;
- setPathVariable: (const char*) var;
- setFileMode: (int) mode;
- (const char*) typeName;
- (const char*) pathVariable;
- (const char*) defaultPath;
- (int) fileMode;
- write:(NXTypedStream *) stream;
- read: (NXTypedStream *) stream;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.