realpath 百科内容来自于: 百度百科

相关函数: readlink, getcwd
表头文件: #include <limits.h>
#include <stdlib.h>
函数原型:char *realpath(const char *path, char *resolved_path)
函数说明:realpath()用来将参数path所指的相对路径转换成绝对路径后存于参数resolved_path所指的字符串数组指针
返回值: 成功则返回指向resolved_path的指针,失败返回NULL,错误代码存于errno
范例:
#include <unistd.h>
main()
{
char resolved_path[80];
realpath("/usr/X11R6/lib/modules/../../include/../",resolved_path);
printf("resolved_path: %s\n", resolved_path);
}
$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定