OSDN Git Service

6bebd8d0419f80acfafe3dc28918adf2d2527249
[linuxjm/LDP_man-pages.git] / release / man3 / canonicalize_file_name.3
1 .\" Copyright 2013 Michael Kerrisk (mtk.manpages@gmail.com).
2 .\" (Replaces an earlier page by Walter Harms and Michael Kerrisk)
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .\"*******************************************************************
27 .\"
28 .\" This file was generated with po4a. Translate the source file.
29 .\"
30 .\"*******************************************************************
31 .TH CANONICALIZE_FILE_NAME 3 2013\-03\-10 GNU "Linux Programmer's Manual"
32 .SH 名前
33 canonicalize_file_name \- 正規化された絶対パス名を返す
34 .SH 書式
35 \fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */
36 .br
37 \fB#include <stdlib.h>\fP
38 .sp
39 \fBchar *canonicalize_file_name(const char *\fP\fIpath\fP\fB);\fP
40 .SH 説明
41 The \fBcanonicalize_file_name\fP()  function returns a null\-terminated string
42 containing the canonicalized absolute pathname corresponding to \fIpath\fP.  In
43 the returned string, symbolic links are resolved, as are \fI.\fP and \fI..\fP
44 pathname components.  Consecutive slash (\fI/\fP)  characters are replaced by a
45 single slash.
46
47 The returned string is dynamically allocated by \fBcanonicalize_file_name\fP()
48 and the caller should deallocate it with \fBfree\fP(3)  when it is no longer
49 required.
50
51 \fIcanonicalize_file_name(path)\fP は以下と等価である。
52
53     realpath(path, NULL);
54 .SH 準拠
55 この関数は GNU による拡張である。
56 .SH 返り値
57 On success, \fBcanonicalize_file_name\fP()  returns a null\-terminated string.
58 On error (e.g., a pathname component is unreadable or does not exist),
59 \fBcanonicalize_file_name\fP()  returns NULL and sets \fIerrno\fP to indicate the
60 error.
61 .SH エラー
62 \fBrealpath\fP(3) 参照。
63 .SH 関連項目
64 \fBreadlink\fP(2), \fBrealpath\fP(3)
65 .SH この文書について
66 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
67 である。プロジェクトの説明とバグ報告に関する情報は
68 http://www.kernel.org/doc/man\-pages/ に書かれている。