Functions | |
| char * | find_file (char *name, char *path, int mode) |
Search for a file in the specified path (or in GLPATH environment variable) access flags: 0 = exist only, 2 = write, 4 = read, 6 = read/write. | |
| OBJECT * | find_first (FINDLIST *list) |
| Returns the first object currently in the the search list return. | |
| int | find_makearray (FINDLIST *list, OBJECT ***objs) |
| Makes an array from the objects currently in the search list result. | |
| OBJECT * | find_next (FINDLIST *list, OBJECT *obj) |
| Return the next object in the currenet search list. | |
| FINDLIST * | find_objects (FINDLIST *start,...) |
Search for objects that match criteria start may be a previous search result, or FT_NEW. | |
| FINDLIST * | findlist_copy (FINDLIST *list) |
| Make a copy of a findlist. | |
| char* find_file | ( | char * | name, | |
| char * | path, | |||
| int | mode | |||
| ) |
Search for a file in the specified path (or in GLPATH environment variable) access flags: 0 = exist only, 2 = write, 4 = read, 6 = read/write.
| name | the name of the file to find |
| path | the path to search (or NULL to search the GLPATH environment) |
| mode | the file access mode to use, see access() for valid modes |
Definition at line 1265 of file find.c.
Referenced by legal_notice(), load_tzspecs(), loadall(), module_load(), and unit_init().
| OBJECT* find_first | ( | FINDLIST * | list | ) | [read] |
Returns the first object currently in the the search list return.
| list | the search list to scan |
Definition at line 516 of file find.c.
References find_next().
Referenced by aggregate_mkgroup(), aggregate_value(), cmex_object_list(), exec_debug_cmd(), find_makearray(), and random_apply().
| int find_makearray | ( | FINDLIST * | list, | |
| OBJECT *** | objs | |||
| ) |
Makes an array from the objects currently in the search list result.
| list | the search list to scan |
| objs | the object found |
Definition at line 498 of file find.c.
References find_first(), and find_next().
Return the next object in the currenet search list.
| list | the search list to scan |
| obj | the current object |
Definition at line 524 of file find.c.
References object_get_first().
Referenced by aggregate_value(), cmex_object_list(), exec_debug_cmd(), find_first(), find_makearray(), and random_apply().
| FINDLIST* find_objects | ( | FINDLIST * | start, | |
| ... | ||||
| ) |
Search for objects that match criteria start may be a previous search result, or FT_NEW.
FT_NEW starts a new search (starting with all objects)
Searches criteria may be as follows:
find_objects(FT_NEW, ftype, compare, value[, ...], NULL);
and may be grouped using AND and OR.
The criteria list must be terminated by NULL or FT_END.
Values of ftype are:
FT_ID compares object ids (expects long value)FT_SIZE compares object size excluding header (expects long value)FT_CLASS compares object class name (expects char* value)FT_PARENT uses parent for comparison (must be followed by another ftype)FT_RANK compares object rank by number (expects long value)FT_CLOCK compares object clock (expects TIMESTAMP value)FT_PROPERTY compares property (expects char* value)FT_MODULE compares module name
Extended values of ftype are:
CF_NAME looks for a particular nameCF_LATT compares object lattitudesCF_LONG compares object longitudesCF_INSVC checks in-service timestampCF_OUTSVC checks out-service timestamp
Values of compare are:
EQ equalNE not equalLT less thanGT greater thanLE less than or equalGE greather than or equalNOT opposite of testBETWEEN in betweenSAME same stringBEFORE alphabetic beforeAFTER alphabetic afterDIFF alphabetic differMATCH matches regex LIKE matches regex UNLIKE matches "not" regex Conjunctions are AND and OR, and can be used to do complex searches
OBJECT *find_first(FINDLIST *list) returns the first object in the result list
OBJECT *find_next(FINDLIST *list, OBJECT *previous) returns the next object in the result list
Definition at line 353 of file find.c.
References object_get_count(), object_get_first(), and output_error().
Referenced by cmex_object_list(), exec_debug_cmd(), and random_apply().
| FINDLIST* findlist_copy | ( | FINDLIST * | list | ) |