This section is based on catpages contributed by Mainichi Communications, Inc. Translated by: MYCOM team Converted by: Japanese Online Manual Project <man-jp@jp.FreeBSD.ORG> Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>
112 lines
3.4 KiB
Groff
112 lines
3.4 KiB
Groff
.\" Copyright (c) 1994
|
||
.\" The Regents of the University of California. All rights reserved.
|
||
.\"
|
||
.\" This code is derived from software contributed to Berkeley by
|
||
.\" Jan-Simon Pendry.
|
||
.\"
|
||
.\" Redistribution and use in source and binary forms, with or without
|
||
.\" modification, are permitted provided that the following conditions
|
||
.\" are met:
|
||
.\" 1. Redistributions of source code must retain the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer.
|
||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer in the
|
||
.\" documentation and/or other materials provided with the distribution.
|
||
.\" 3. All advertising materials mentioning features or use of this software
|
||
.\" must display the following acknowledgement:
|
||
.\" This product includes software developed by the University of
|
||
.\" California, Berkeley and its contributors.
|
||
.\" 4. Neither the name of the University nor the names of its contributors
|
||
.\" may be used to endorse or promote products derived from this software
|
||
.\" without specific prior written permission.
|
||
.\"
|
||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||
.\" SUCH DAMAGE.
|
||
.\"
|
||
.\" @(#)realpath.3 8.2 (Berkeley) 2/16/94
|
||
.\"
|
||
.Dd February 16, 1994
|
||
.Dt REALPATH 3
|
||
.Os
|
||
.Sh ̾¾Î
|
||
.Nm realpath
|
||
.Nd Àµµ¬¤ÎÀäÂХѥ¹Ì¾¤òÌ᤹
|
||
.Sh ½ñ¼°
|
||
.Fd #include <sys/param.h>
|
||
.Fd #include <stdlib.h>
|
||
.Ft "char *"
|
||
.Fn realpath "const char *pathname" "char resolvedname[MAXPATHLEN]"
|
||
.Sh ²òÀâ
|
||
.Fn realpath
|
||
´Ø¿ô¤Ï¡¢
|
||
.Fa pathname
|
||
¤Î¤¹¤Ù¤Æ¤Î¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¡¢Í¾Ê¬¤Ê
|
||
.Dq /
|
||
¥¥ã¥é¥¯¥¿¡¢
|
||
Pa /./
|
||
¤È
|
||
Pa /../
|
||
¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¤òʬÀϤ·¡¢
|
||
.Fa resolvedname
|
||
¤¬»²¾È¤¹¤ë¥á¥â¥ê¤ËÀäÂХѥ¹Ì¾¤ò¥³¥Ô¡¼¤·¤Þ¤¹¡£
|
||
.Fa resolvedname
|
||
°ú¿ô¤Ï¡¢ºÇÄã¤Ç
|
||
.Dv MAXPATHLEN
|
||
¥¥ã¥é¥¯¥¿¤òÊݸ¤Ç¤¤ë¥Ð¥Ã¥Õ¥¡¤ò»²¾È¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|
||
.Pp
|
||
.Fn realpath
|
||
´Ø¿ô¤Ï¡¢ÀäÂХѥ¹¤ÈÁêÂХѥ¹¤ÎξÊý¤òʬÀϤ·¡¢
|
||
.Fa pathname
|
||
¤Ë
|
||
Âбþ¤¹¤ëÀäÂХѥ¹Ì¾¤òÌᤷ¤Þ¤¹¡£
|
||
.Fa pathname
|
||
¤ÎºÇ¸å¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È°Ê³°¤Ï¡¢
|
||
.Fn readpath
|
||
¤ò¸Æ¤Ó½Ð¤·¤¿¤È¤¤Ë¸ºß¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|
||
.Sh Ìá¤êÃÍ
|
||
.Fn realpath
|
||
´Ø¿ô¤Ï¡¢ÌäÂ꤬¤Ê¤±¤ì¤Ð
|
||
.Fa resolved_name
|
||
¤òÌᤷ¤Þ¤¹¡£¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¡¢
|
||
.Fn realpath
|
||
¤Ï
|
||
.Dv NULL
|
||
¤òÌᤷ¡¢ÌäÂê¤È¤Ê¤Ã¤¿¥Ñ¥¹Ì¾¤ò
|
||
.Fa resolved_name
|
||
¤ËÆþ¤ì¤Þ¤¹¡£
|
||
.Sh ¥¨¥é¡¼
|
||
.Fn realpath
|
||
´Ø¿ô¤¬¥¨¥é¡¼¤È¤Ê¤ë¤È¡¢¥é¥¤¥Ö¥é¥ê´Ø¿ô
|
||
.Xr chdir 2 ,
|
||
.Xr close 2 ,
|
||
.Xr fchdir 2 ,
|
||
.Xr lstat 2 ,
|
||
.Xr open 2 ,
|
||
.Xr readlink 2 ,
|
||
.Xr getcwd 3
|
||
¤Ë»ØÄꤵ¤ì¤Æ¤¤¤ë¥¨¥é¡¼¤Ë³°ÉôÊÑ¿ô
|
||
.Va errno
|
||
¤¬ÀßÄꤵ¤ì¤Þ¤¹¡£
|
||
.Sh ·Ù¹ð
|
||
¤³¤Î
|
||
.Fn realpath
|
||
¥·¥¹¥Æ¥à¤Ï¡¢Solaris ¥·¥¹¥Æ¥à¤È¤Ï¿¾¯°Û¤Ê¤ê¤Þ¤¹¡£
|
||
.Bx 4.4
|
||
¥Ð¡¼¥¸¥ç¥ó¤Ï¾ï¤ËÀäÂХѥ¹Ì¾¤òÌᤷ¤Þ¤¹¤¬¡¢Solaris ¥·¥¹¥Æ¥à¤Ï¡¢ÁêÂХѥ¹Ì¾
|
||
¤¬»ØÄꤵ¤ì¤ë¤ÈÁêÂХѥ¹Ì¾¤òÌᤷ¤Þ¤¹¡£
|
||
.Sh ´ØÏ¢¹àÌÜ
|
||
.Xr getcwd 3
|
||
.Sh Îò»Ë
|
||
.Fn realpath
|
||
´Ø¿ô¤Ï¡¢
|
||
.Bx 4.4
|
||
¤ËºÇ½é¤ËÅо줷¤Þ¤·¤¿¡£
|