10 /* getpath th -- get the path of the file name specified by the first parameter
11 * of the function and store the path in its second parmater.
12 * the function returns the length of the path of the file.
14 * param file_name The file name to get the path
15 * param path The address of the path of the file
17 * return If successful, the function returns the len of the path.
18 * Otherwise the function returns -1 and sets errno to indicate
23 * [ENOENT] the file name specified as parameter does not exist.
25 * [ENOMEM] because this function use calloc, errno can be set with
30 getpath(const char* file_name, char** path);
32 /* translatepath -- path translation
34 * param totranslate The path to translate.
35 * param transled The address of the translated path.
37 * return If successful the function returns the len of the translated path.
38 * 0therwise the function returns -1 and sets the global variable errno
39 * to indicate the error.
41 * errors [ENOTDIR] the path to translate is not a directory.
43 * [ENOMEM] because this function use calloc, errno can be set with
47 translatepath(const char* totranslate, char** translated);
54 #endif /* !__GETPATH_H */