MAOS
Multithreaded Adaptive Optics Simulator
Loading...
Searching...
No Matches
path.h File Reference

Functions

void addpath2 (int priority, const char *format,...) CHECK_ARG(2)
void addpath (const char *path)
void rmpath (const char *path)
void printpath (void)
char * search_file (const char *fn, int current)
void freepath (void)
char * find_config (const char *name)

Detailed Description

This file contains function managing the searching path for files, behaves like PATH in POSIX systems.

Function Documentation

◆ addpath2()

void addpath2 ( int priority,
const char * format,
... )

Add a directory to path. Higher priority is searched first.

◆ addpath()

void addpath ( const char * path)

Add a directory to path with default priority of 0.

◆ rmpath()

void rmpath ( const char * path)

Remove a directory from path.

◆ printpath()

void printpath ( void )

Print current path.

◆ search_file()

char * search_file ( const char * fn,
int current )

Try to find a file in path and return its absolute filename if exist, NULL otherwise.

Parameters
fnfilename to search
currentsearch current folder

◆ freepath()

void freepath ( void )

Empty the path.

◆ find_config()

char * find_config ( const char * name)

Find the directory that hold the configuration files. name is "maos" for maos, "skyc" for skyc.