|
SDDS ToolKit Programs and Libraries for C and Python
|
Implementation of search path management and file locating functions.
Definition in file searchPath.c.
#include "mdb.h"Go to the source code of this file.
Functions | |
| void | setSearchPath (char *input) |
| Sets the search path for file lookup. | |
| char * | findFileInSearchPath (const char *filename) |
| Finds a file within the configured search path. | |
| char * findFileInSearchPath | ( | const char * | filename | ) |
Finds a file within the configured search path.
This function searches for the specified filename in each directory listed in the search_path. If the filename includes SDDS tags (indicated by '=' and '+'), the tags are processed and appended to the found file path.
| filename | The name of the file to locate. It may include SDDS tags in the format <filename>=<x>+<y>. |
NULL if the file is not found. Definition at line 49 of file searchPath.c.
| void setSearchPath | ( | char * | input | ) |
Sets the search path for file lookup.
This function updates the global search_path variable. If a new input path is provided, it copies the input string to search_path, freeing any previously allocated memory. If the input is NULL, search_path is set to NULL.
| input | The new search path to set. If NULL, the search path is cleared. |
Definition at line 28 of file searchPath.c.