OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[linuxjm/LDP_man-pages.git] / draft / 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 .\"
32 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
33 .\" Translated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
34 .\" Updated 2013-05-04, Akihiro MOTOKI <amotoki@gmail.com>
35 .\" Updated 2013-07-15, Akihiro MOTOKI <amotoki@gmail.com>
36 .\"
37 .TH CANONICALIZE_FILE_NAME 3 2013\-05\-11 GNU "Linux Programmer's Manual"
38 .SH 名前
39 canonicalize_file_name \- 正規化された絶対パス名を返す
40 .SH 書式
41 \fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */
42 .br
43 \fB#include <stdlib.h>\fP
44 .sp
45 \fBchar *canonicalize_file_name(const char *\fP\fIpath\fP\fB);\fP
46 .SH 説明
47 \fBcanonicalize_file_name\fP() 関数は \fIpath\fP に対応する正規化された絶対パス名を示す NULL
48 終端された文字列を返す。返された文字列では、シンボリックリンクや、パス名に含まれる \fI.\fP や \fI..\fP は展開される。連続するスラッシュ
49 (\fI/\fP) 文字はスラッシュ一つに置換される。
50
51 返される文字列は \fBcanonicalize_file_name\fP() により動的に割り当てられる。呼び出し側は、必要なくなった際にはこの文字列を
52 \fBfree\fP(3) で解放すべきである。
53
54 \fIcanonicalize_file_name(path)\fP は以下と等価である。
55
56     realpath(path, NULL);
57 .SH 返り値
58 成功すると、 \fBcanonicalize_file_name\fP() は NULL 終端された文字列を返す。エラーの場合
59 (例えば、パス名の中に読み込めなかったり存在しないパスが含まれている場合など)、 \fBcanonicalize_file_name\fP() は NULL
60 を返し、 \fIerrno\fP にエラー内容を示す値を設定する。
61 .SH エラー
62 \fBrealpath\fP(3) 参照。
63 .SH 準拠
64 この関数は GNU による拡張である。
65 .SH 関連項目
66 \fBreadlink\fP(2), \fBrealpath\fP(3)
67 .SH この文書について
68 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
69 である。プロジェクトの説明とバグ報告に関する情報は
70 http://www.kernel.org/doc/man\-pages/ に書かれている。