Go to the source code of this file.
Functions | |
char * | find_user_path (const char *mbsfile) |
Find the user folder corresponding to the given *.mbs file. More... | |
int | find_project_path (const char *mbsfile, char *prjpath) |
Find the project directory (containing dataR, symbolicR, ...). More... | |
char * | mbs_basename (const char *path) |
mbs_basename return sthe trailing part of the path (UNIX and MAC). More... | |
char * | mbs_dirname (const char *path) |
mbs_dirname returns the leading part of the path (UNIX and MAC). More... | |
int find_project_path | ( | const char * | mbsfile, |
char * | prjpath | ||
) |
Find the project directory (containing dataR, symbolicR, ...).
prjpath should be large enough to contain at least mbsfile.
[in] | mbsfile | the path and filename to the .mbs file |
[out] | prjpath | the path to the root of the mbs project |
char* find_user_path | ( | const char * | mbsfile | ) |
Find the user folder corresponding to the given *.mbs file.
This function allocat a char* that must be freed by the user.
[in] | mbsfile | the path and filename to the .mbs file |
char* mbs_basename | ( | const char * | path | ) |
mbs_basename return sthe trailing part of the path (UNIX and MAC).
If the path ends on a folder, it returns the terminal folder. If it is a file it returns the filename and its extention.
If the path is the root folder it returns '/'. However under Windows we do not check if the path only contains the path to a drive (such as 'C:/').
path | The path from which the basename must be extracted. |
char* mbs_dirname | ( | const char * | path | ) |
mbs_dirname returns the leading part of the path (UNIX and MAC).
If the path ends on a folder, it returns the previous folder. If it is a file it returns the path to the folder containing the file.
If the path is the root folder it returns '/'. However under Windows we do not check if the path only contains the path to a drive (such as 'C:/').
path | The path from which the leading part must be extracted. |