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