doc/ja_JP.eucJP/man/man3/fts.3
Kazuo Horikawa 6a00dc5ed2 man3 update to 4.5-RELEASE base done by jpman project <man-jp@jp.FreeBSD.org>
Submitted by:	Yuko Sasaki <yuko@veltec.co.jp>
2002-05-18 07:12:57 +00:00

715 lines
18 KiB
Groff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.\" Copyright (c) 1989, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
.\" 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.
.\"
.\" @(#)fts.3 8.5 (Berkeley) 4/16/94
.\" %FreeBSD: src/lib/libc/gen/fts.3,v 1.7.2.5 2001/12/14 18:33:51 ru Exp %
.\"
.\" $FreeBSD$
.Dd April 16, 1994
.Dt FTS 3
.Os
.Sh ̾¾Î
.Nm fts
.Nd ¥Õ¥¡¥¤¥ë¤Î³¬Áؤò²£ÃǤ¹¤ë
.Sh ¥é¥¤¥Ö¥é¥ê
.Lb libc
.Sh ½ñ¼°
.In sys/types.h
.In sys/stat.h
.In fts.h
.Ft FTS *
.Fn fts_open "char * const *path_argv" "int options" "int (*compar)(const FTSENT **, const FTSENT **)"
.Ft FTSENT *
.Fn fts_read "FTS *ftsp"
.Ft FTSENT *
.Fn fts_children "FTS *ftsp" "int options"
.Ft int
.Fn fts_set "FTS *ftsp" "FTSENT *f" "int options"
.Ft int
.Fn fts_close "FTS *ftsp"
.Sh ²òÀâ
.Nm
¤Ï¡¢
.Tn UNIX
¥Õ¥¡¥¤¥ë³¬Áؤò²£ÃǤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¹¡£´Êñ¤ËÀâÌÀ¤¹¤ë¤È¡¢
.Fn fts_open
´Ø¿ô¤Ï¥Õ¥¡¥¤¥ë³¬ÁؤÎ
.Dq ¥Ï¥ó¥É¥ë
¤òÌᤷ¤Þ¤¹¡£¤³¤Î¥Ï¥ó¥É¥ë¤Ï¡¢¤½¤Î¾¤Î
.Nm
´Ø¿ô¤Ë»ØÄê¤Ç¤­¤Þ¤¹¡£
.Fn fts_read
´Ø¿ô¤Ï¡¢¥Õ¥¡¥¤¥ë³¬ÁؤΠ1 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤òɽ¤¹¹½Â¤ÂΤΥݥ¤¥ó¥¿¤òÌᤷ¤Þ¤¹¡£
.Fn fts_children
´Ø¿ô¤Ï¡¢¹½Â¤ÂΤΥê¥ó¥¯¥ê¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÌᤷ¤Þ¤¹¡£³Æ¹½Â¤ÂΤϡ¢
¤½¤Î³¬ÁؤΤ¢¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ë´Þ¤Þ¤ì¤ë¥Õ¥¡¥¤¥ë 1 ¤Ä¤òɽ¤·¤Þ¤¹¡£
°ìÈ̤ˡ¢¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢Àµ½ç (¤¤¤º¤ì¤Î»Ò¤Ë¥¢¥¯¥»¥¹¤¹¤ëÁ°) ¤È
µÕ½ç (¤¹¤Ù¤Æ¤Î»Ò¤Ë¥¢¥¯¥»¥¹¤·¤¿¸å) ¤Î 2 ²ó¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤¹¡£
¥Õ¥¡¥¤¥ë¤Ï 1 ²ó¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤¹¡£
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤ò̵»ë¤·¤¿¡¢³¬ÁؤؤÎ
.Dq ÏÀÍýŪ¤Ê
¥¢¥¯¥»¥¹¡¢
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤ò¤¿¤É¤ë¡¢³¬ÁؤؤÎʪÍýŪ¤Ê¥¢¥¯¥»¥¹¡¢
³¬ÁؤؤΥ¢¥¯¥»¥¹Ì¿Îá¡¢³¬ÁؤΰìÉô¤ÎÀÚ¤êÎ¥¤·¤äºÆ¥¢¥¯¥»¥¹¤¬²Äǽ¤Ç¤¹¡£
.Pp
¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë
.Aq Pa fts.h
¤Ë¤Ï¡¢2 ¤Ä¤Î¹½Â¤ÂΤ¬ÄêµÁ¤µ¤ì¤Æ (¤«¤Ä¡¢typedef ·¿ÄêµÁ¤â¤µ¤ì¤Æ) ¤¤¤Þ¤¹¡£
1 ¤Ä¤Ï¡¢¥Õ¥¡¥¤¥ë³¬Áؤ½¤Î¤â¤Î¤òɽ¤¹¹½Â¤ÂÎ
.Fa FTS
¤Ç¤¹¡£¤â¤¦ 1 ¤Ä¤Ï¡¢¥Õ¥¡¥¤¥ë³¬ÁؤΥե¡¥¤¥ë 1 ¤Ä¤òɽ¤¹¹½Â¤ÂÎ
.Fa FTSENT
¤Ç¤¹¡£Ä̾ï¤Ï¡¢¥Õ¥¡¥¤¥ë³¬ÁؤΥե¡¥¤¥ë¤¹¤Ù¤Æ¤Ë¤Ä¤¤¤Æ¡¢¹½Â¤ÂÎ
.Fa FTSENT
¤¬ 1 ¤ÄÌᤵ¤ì¤Þ¤¹¡£¤³¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ç¤Ï¡¢
.Dq ¥Õ¥¡¥¤¥ë
¤È
.Dq Fa FTSENT No ¹½Â¤ÂÎ
¤Ï¡¢¤Û¤ÜƱ¤¸°ÕÌ£¤ò»ý¤Á¤Þ¤¹¡£
.Fa FTSENT
¹½Â¤ÂΤˤϡ¢¾¯¤Ê¤¯¤È¤â°Ê²¼¤Ë¼¨¤¹¥Õ¥£¡¼¥ë¥É¤ò´Þ¤ß¤Þ¤¹¡£¤½¤ì¤¾¤ì¤Î
¥Õ¥£¡¼¥ë¥É¤Ë¤Ä¤¤¤Æ¤Ï¡¢¸å¤Ç¾Ü¤·¤¯ÀâÌÀ¤·¤Þ¤¹¡£
.Bd -literal
typedef struct _ftsent {
u_short fts_info; /* flags for FTSENT structure */
char *fts_accpath; /* access path */
char *fts_path; /* root path */
u_short fts_pathlen; /* strlen(fts_path) */
char *fts_name; /* file name */
u_short fts_namelen; /* strlen(fts_name) */
short fts_level; /* depth (\-1 to N) */
int fts_errno; /* file errno */
long fts_number; /* local numeric value */
void *fts_pointer; /* local address value */
struct ftsent *fts_parent; /* parent directory */
struct ftsent *fts_link; /* next file structure */
struct ftsent *fts_cycle; /* cycle structure */
struct stat *fts_statp; /* stat(2) information */
} FTSENT;
.Ed
.Pp
¤³¤ì¤é¤Î¥Õ¥£¡¼¥ë¥É¤Ï¡¢°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
.Bl -tag -width "fts_namelen"
.It Fa fts_info
Ìᤵ¤ì¤¿
.Fa FTSENT
¹½Â¤ÂΤȤ½¤ì¤¬É½¤¹¥Õ¥¡¥¤¥ë¤òµ­½Ò¤·¤Þ¤¹¡£°Ê²¼¤Î¤¦¤Á 1 ¤Ä¤ÎÃͤò¼è¤ê¤Þ¤¹¡£
¥¨¥é¡¼¤Î¤Ê¤¤¥Ç¥£¥ì¥¯¥È¥ê
.Pq Dv FTS_D
¤ò½ü¤±¤Ð¡¢¤¹¤Ù¤Æ¤Î¥¨¥ó¥È¥ê¤Ï½ªÃ¼¤Ç¤¹¡£¤Ä¤Þ¤ê¡¢ºÆ¥¢¥¯¥»¥¹¤µ¤ì¤ë¤³¤È¤Ï
¤Ê¤¯¡¢»Ò¤¬¥¢¥¯¥»¥¹¤µ¤ì¤ë¤³¤È¤â¤¢¤ê¤Þ¤»¤ó¡£
.Bl -tag -width FTS_DEFAULT
.It Dv FTS_D
Àµ½ç¤Ç¥¢¥¯¥»¥¹¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£
.It Dv FTS_DC
¥Ä¥ê¡¼¤Ç¤Î½Û´Ä¤Î¸¶°ø¤È¤Ê¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£
(
.Fa FTSENT
¹½Â¤ÂΤÎ
.Fa fts_cycle
¥Õ¥£¡¼¥ë¥É¤Ë¤âƱÍͤˤ³¤Î¾ðÊó¤¬Æþ¤ê¤Þ¤¹¡£)
.It Dv FTS_DEFAULT
¾¤Î¤É¤Î
.Fa fts_info
¤ÎÃͤǤâÌÀ³Î¤Ëɽ¤µ¤Ê¤¤¥Õ¥¡¥¤¥ë¥¿¥¤¥×¤òɽ¤¹
.Fa FTSENT
¹½Â¤ÂΤǤ¹¡£
.It Dv FTS_DNR
Æɤ߹þ¤á¤Ê¤¤¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£¤³¤ì¤Ï¥¨¥é¡¼¥ê¥¿¡¼¥ó¤Ç¡¢
.Fa fts_errno
¥Õ¥£¡¼¥ë¥É¤Ë¥¨¥é¡¼¤Î¸¶°ø¤òɽ¤¹Ãͤ¬ÀßÄꤵ¤ì¤Þ¤¹¡£
.It Dv FTS_DOT
.Fn fts_open
¤Ë¥Õ¥¡¥¤¥ë̾¤È¤·¤Æ»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡¢
.Ql .\&
¤ä¡¢
.Ql ..\&
¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¥Õ¥¡¥¤¥ë¤Ç¤¹ (
.Dv FTS_SEEDOT
¤ò»²¾È)¡£
.It Dv FTS_DP
µÕ½ç¤Ç¥¢¥¯¥»¥¹¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£
Àµ½ç (¤Ä¤Þ¤ê¡¢
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤Ë
.Dv FTS_D
¤¬ÀßÄꤵ¤ì¤¿¾ì¹ç) ¤ÇÌá¤Ã¤Æ¤­¤¿»þ¤Ï¡¢
.Fa FTSENT
¹½Â¤ÂΤÎÆâÍƤÏÊѹ¹¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
.It Dv FTS_ERR
¤³¤ì¤Ï¥¨¥é¡¼¥ê¥¿¡¼¥ó¤Ç¤¢¤ê¡¢
.Fa fts_errno
¥Õ¥£¡¼¥ë¥É¤Ë¥¨¥é¡¼¤Î¸¶°ø¤¬ÀßÄꤵ¤ì¤Þ¤¹¡£
.It Dv FTS_F
Ä̾ï¥Õ¥¡¥¤¥ë¤Ç¤¹¡£
.It Dv FTS_NS
.Xr stat 2
¤Ç¾ðÊ󤬼èÆÀ¤Ç¤­¤Ê¤¤¥Õ¥¡¥¤¥ë¤Ç¤¹¡£
.Fa fts_statp
¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤÏ̤ÄêµÁ¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤ì¤Ï¥¨¥é¡¼¥ê¥¿¡¼¥ó¤Ç¤¢¤ê¡¢
.Fa fts_errno
¥Õ¥£¡¼¥ë¥É¤Ë¥¨¥é¡¼¤Î¸¶°ø¤òɽ¤¹Ãͤ¬ÀßÄꤵ¤ì¤Þ¤¹¡£
.It Dv FTS_NSOK
.Xr stat 2
¤Ç¤Î¾ðÊó¼èÆÀ¤òÍ׵ᤷ¤Ê¤¤¥Õ¥¡¥¤¥ë¤Ç¤¹¡£
.Fa fts_statp
¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤÏÉÔÄê¤Ë¤Ê¤ê¤Þ¤¹¡£
.It Dv FTS_SL
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ç¤¹¡£
.It Dv FTS_SLNONE
¥¿¡¼¥²¥Ã¥È¤¬Â¸ºß¤·¤Ê¤¤¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ç¤¹¡£
.Fa fts_statp
¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤϡ¢¤½¤Î¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¼«ÂΤÎ
¥Õ¥¡¥¤¥ëÆÃÀ­¾ðÊó¤ò»²¾È¤·¤Þ¤¹¡£
.El
.It Fa fts_accpath
¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¥Õ¥¡¥¤¥ë¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Î¥Ñ¥¹¤Ç¤¹¡£
.It Fa fts_path
²£ÃǤΥ롼¥È¤«¤é¤Î¡¢¥Õ¥¡¥¤¥ë¤ÎÁêÂХѥ¹¤Ç¤¹¡£¤³¤Î¥Ñ¥¹¤Ë¤Ï¡¢
.Fn fts_open
¤Ë»ØÄꤷ¤¿¥Ñ¥¹¤¬ÀÜƬ¸ì¤È¤·¤Æ´Þ¤Þ¤ì¤Þ¤¹¡£
.It Fa fts_pathlen
.Fa fts_path
¤¬»²¾È¤¹¤ëʸ»úÎó¤ÎŤµ¤Ç¤¹¡£
.It Fa fts_name
¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ç¤¹¡£
.It Fa fts_namelen
.Fa fts_name
¤¬»²¾È¤¹¤ëʸ»úÎó¤ÎŤµ¤Ç¤¹¡£
.It Fa fts_level
¤³¤Î¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤Ã¤¿¾ì½ê¤Î¡¢¤³¤Î²£ÃǤˤª¤±¤ë¿¼¤µ¤Ç¤¹¡£¤³¤Î¿¼¤µ¤Ï \-1
¤«¤é N ¤Þ¤Ç¤ÎÈֹ椬ÉÕ¤±¤é¤ì¤Þ¤¹¡£²£ÃǤγ«»ÏÅÀ¤Î¿Æ (¤Þ¤¿¤Ï¥ë¡¼¥È) ¤òɽ¤¹
.Fa FTSENT
¹½Â¤ÂΤˤϡ¢ÈÖ¹æ
.Dv FTS_ROOTPARENTLEVEL
(\-1) ¤¬ÉÕ¤µ¤ì¤Þ¤¹¡£
¥ë¡¼¥È¤Î
.Fa FTSENT
¹½Â¤ÂΤˤϡ¢ÈÖ¹æ
.Dv FTS_ROOTLEVEL
(0) ¤¬ÉÕ¤µ¤ì¤Þ¤¹¡£
.It Fa fts_errno
´Ø¿ô
.Fn fts_children
¤â¤·¤¯¤Ï
.Fn fts_read
¤¬¹½Â¤ÂÎ
.Fa FTSENT
¤òÌ᤹¤ËºÝ¤·¡¢
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤Ë
.Dv FTS_DNR ,
.Dv FTS_ERR ,
.Dv FTS_NS
¤Î¤¤¤º¤ì¤«¤¬ÀßÄꤵ¤ì¤¿¾õÂ֤ξì¹ç¤Ï¡¢
.Fa fts_errno
¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥¨¥é¡¼¤Î¸¶°ø¤ò¼¨¤¹³°ÉôÊÑ¿ô
.Va errno
¤ÎÃͤò´Þ¤ß¤Þ¤¹¡£¤½¤Î¾¤Î¾ì¹ç¡¢
.Fa fts_errno
¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤÏ̤ÄêµÁ¤Ç¤¹¡£
.It Fa fts_number
¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤Ç
»ÈÍѤ¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¡¢
.Nm
´Ø¿ô·²¤Ï¤³¤Î¥Õ¥£¡¼¥ë¥É¤òÊѹ¹¤·¤Þ¤»¤ó¡£¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï
0 ¤Ç½é´ü²½¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
.It Fa fts_pointer
¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤Ç»ÈÍѤ¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¡¢
.Nm
´Ø¿ô·²¤Ï¤³¤Î¥Õ¥£¡¼¥ë¥É¤ò½¤Àµ¤·¤Þ¤»¤ó¡£¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ï
.Dv NULL
¤Ç½é´ü²½¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
.It Fa fts_parent
¤³¤Î¥Õ¥¡¥¤¥ë¤¬¥á¥ó¥Ð¤È¤Ê¤Ã¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¤è¤¦¤Ë¡¢¸½ºßÃåÌܤ·¤Æ¤¤¤ë
¥Õ¥¡¥¤¥ë¤Î¤¹¤°¾å¤Î³¬Áؤˤ¢¤ë¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë
.Fa FTSENT
¹½Â¤ÂΤΥݥ¤¥ó¥¿¤Ç¤¹¡£½é´ü¥¨¥ó¥È¥ê¥Ý¥¤¥ó¥È¤Î¿Æ¹½Â¤ÂΤâÄ󶡤µ¤ì¤Þ¤¹¤¬¡¢
.Fa fts_level
¥Õ¥£¡¼¥ë¥É¡¢
.Fa fts_number
¥Õ¥£¡¼¥ë¥É¡¢
.Fa fts_pointer
¥Õ¥£¡¼¥ë¥É¤Î½é´ü²½¤·¤«Êݾڤµ¤ì¤Þ¤»¤ó¡£
.It Fa fts_link
.Fn fts_children
´Ø¿ô¤«¤éÌá¤ë¤È¡¢
.Fa fts_link
¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥Ç¥£¥ì¥¯¥È¥ê¤Î¥á¥ó¥Ð¤òɽ¤¹¡¢¥Ê¥ë½ªÃ¼¤µ¤ì¤¿¥ê¥ó¥¯¥ê¥¹¥È
¤ÎÃæ¤Î¼¡¤Î¹½Â¤ÂΤò»Ø¤·¤Þ¤¹¡£¤½¤Î¾¤Î¾ì¹ç¡¢
.Fa fts_link
¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤÏ̤ÄêµÁ¤Ç¤¹¡£
.It Fa fts_cycle
¥Ç¥£¥ì¥¯¥È¥ê 2 ¤Ä¤Î´Ö¤Î¥Ï¡¼¥É¥ê¥ó¥¯¤ä¡¢¥Ç¥£¥ì¥¯¥È¥ê¤ò»Ø¤¹
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ë¤è¤ê¡¢¤¢¤ë¥Ç¥£¥ì¥¯¥È¥ê¤¬³¬Áع½Â¤¤ÎÃæ¤Ç½Û´Ä¤Î
¸¶°ø¤È¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç (
.Dv FTS_DC
»²¾È)¡¢¤³¤Î¹½Â¤ÂΤÎ
.Fa fts_cycle
¥Õ¥£¡¼¥ë¥É¤Ï¡¢¤³¤Î³¬Áع½Â¤¤ÎÃæ¤Ç¡¢
¸½ºß¤Î
.Fa FTSENT
¹½Â¤ÂΤÈƱ¤¸¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë
.Fa FTSENT
¹½Â¤ÂΤò»Ø¤·¤Þ¤¹¡£¤½¤Î¾¤Î¾ì¹ç¡¢
.Fa fts_cycle
¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤÏ̤ÄêµÁ¤Ç¤¹¡£
.It Fa fts_statp
¥Õ¥¡¥¤¥ë¤Î
.Xr stat 2
¤Î¾ðÊó¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤Ç¤¹¡£
.El
.Pp
¥Õ¥¡¥¤¥ë³¬Áؤˤ¢¤ëÁ´¥Õ¥¡¥¤¥ë¤Î¤¹¤Ù¤Æ¤Î¥Ñ¥¹¤ËÂФ·¡¢1 ¤Ä¤Î¥Ð¥Ã¥Õ¥¡¤ò
»ÈÍѤ·¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢
.Fa fts_path
¥Õ¥£¡¼¥ë¥É¤È
.Fa fts_accpath
¥Õ¥£¡¼¥ë¥É¤Ï¡¢
.Dv NUL Ns ½ªÃ¼¤µ¤ì¤Æ¤¤¤ë
¤³¤È¤¬Êݾڤµ¤ì¤ë¤Î¤Ï¡¢
.Fn fts_read
¤¬ºÇ¸å¤ËÌᤷ¤¿¥Õ¥¡¥¤¥ë
.Em ¤Î¤ß
¤Ç¤¹¡£Â¾¤Î
.Fa FTSENT
¹½Â¤ÂΤ¬É½¤¹¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¤¿¤á¤Ë¡¢¤³¤Î
¥Õ¥£¡¼¥ë¥É¤ò»ÈÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¢¤½¤Î
.Fa FTSENT
¹½Â¤ÂΤÎ
.Fa fts_pathlen
¥Õ¥£¡¼¥ë¥É¤Ë´Þ¤Þ¤ì¤ë¾ðÊó¤Ç¥Ñ¥¹¥Ð¥Ã¥Õ¥¡¤ò
½¤Àµ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
.Fn fts_read
¤ò¤µ¤é¤Ë¸Æ¤Ó½Ð¤¹Á°¤Ë¡¢
¤³¤Î¤è¤¦¤Ê½¤Àµ¤ò¸µ¤ËÌᤷ¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
.Fa fts_name
¥Õ¥£¡¼¥ë¥É¤Ï¡¢¾ï¤Ë
.Dv NUL Ns ½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
.Sh FTS_OPEN
´Ø¿ô
.Fn fts_open
¤Ï¡¢²£ÃÇÂоݤÎÏÀÍý¥Õ¥¡¥¤¥ë³¬Áؤò¹½À®¤¹¤ë
1 ¤Ä°Ê¾å¤Î¥Ñ¥¹¤ò
»ØÄꤹ¤ëʸ»ú·¿¥Ý¥¤¥ó¥¿¤ÎÇÛÎó¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤ò¼è¤ê¤Þ¤¹¡£ÇÛÎó¤Ï¡¢
.Dv NULL
¥Ý¥¤¥ó¥¿¤Ç½ª¤ï¤Ã¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
.Pp
¿ô¿¤¯¤Î¥ª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¤¬¡¢ºÇÄã¤Ç¤â¼¡¤Î¤¦¤Á 1 ¤Ä (
.Dv FTS_LOGICAL
¤«
.Dv FTS_PHYSICAL )
¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥ª¥×¥·¥ç¥ó¤Ï¡¢°Ê²¼¤ÎÃͤÎÏÀÍýϤò
¼è¤ë¤³¤È¤ÇÁªÂò¤µ¤ì¤Þ¤¹¡£
.Bl -tag -width "FTS_PHYSICAL"
.It Dv FTS_COMFOLLOW
¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢
.Dv FTS_LOGICAL
¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ë´Ø¤ï¤é¤º¡¢¥ë¡¼¥È¥Ñ¥¹¤È¤·¤Æ»ØÄꤵ¤ì¤¿
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬¤¹¤°¤Ë¤¿¤É¤é¤ì¤Þ¤¹¡£
.It Dv FTS_LOGICAL
¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢
.Nm
¥ë¡¼¥Á¥ó¤Ï¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤½¤Î¤â¤Î¤Ç¤Ï¤Ê¤¯¡¢
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¥¿¡¼¥²¥Ã¥È¤Î
.Fa FTSENT
¹½Â¤ÂΤòÌ᤹¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ë¤È¡¢
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËÌᤵ¤ì¤ë
.Fa FTSENT
¹½Â¤ÂΤ¬»Ø¤¹¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ï¡¢Â¸ºß¤·¤Ê¤¤¥Õ¥¡¥¤¥ë¤ò
»²¾È¤¹¤ë¤â¤Î¤À¤±¤Ë¤Ê¤ê¤Þ¤¹¡£
.Fn fts_open
´Ø¿ô¤Ë¤Ï¡¢
.Dv FTS_LOGICAL
¤«
.Dv FTS_PHYSICAL
¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
.It Dv FTS_NOCHDIR
¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤òºÇŬ²½¤¹¤ë¤¿¤á¡¢
.Nm
´Ø¿ô¤Ï¡¢¥Õ¥¡¥¤¥ë³¬ÁؤΥ¢¥¯¥»¥¹Ãæ¤Ë
¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤òÊѹ¹¤·¤Þ¤¹¡£¤³¤ì¤Ë¤Ï¡¢²£ÃÇÃæ¤Ë¤É¤Î¥Ç¥£¥ì¥¯¥È¥ê
¤Ë¤¤¤ë¤«¤¬¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÇÆÃÄê¤Ç¤­¤Ê¤¤¤È¤¤¤¦ÉûºîÍѤ¬¤¢¤ê¤Þ¤¹¡£
.Dv FTS_NOCHDIR
¥ª¥×¥·¥ç¥ó¤Ï¤³¤ÎºÇŬ²½¤ò̵¸ú¤Ë¤¹¤ë¤Î¤Ç¡¢
.Nm
´Ø¿ô¤Ï¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤òÊѹ¹¤·¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£
.Dv FTS_NOCHDIR
¤ò»ØÄꤷ¤Æ¤¤¤Ê¤¤¡¢¤â¤·¤¯¤Ï¡¢
.Fn fts_open
¤ËÀäÂХѥ¹Ì¾¤ò°ú¿ô¤È¤·¤Æ»ØÄꤷ¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç
¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤òÊѹ¹¤·¤¿¤ê¡¢¥Õ¥¡¥¤¥ë¤Ë¥¢¥¯¥»¥¹¤·¤¿¤ê
¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£
.It Dv FTS_NOSTAT
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢Ìᤵ¤ì¤ë
.Fa FTSENT
¹½Â¤ÂΤϡ¢¥¢¥¯¥»¥¹¤·¤¿¥Õ¥¡¥¤¥ë¤½¤ì¤¾¤ì¤Ë¤Ä¤¤¤Æ
¥Õ¥¡¥¤¥ëÆÃÀ­¾ðÊó (
.Fa statp
¥Õ¥£¡¼¥ë¥É) ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤ò
ºÇŬ²½¤¹¤ë¤¿¤á¤Ë¤³¤ÎÍ×·ï¤ò´ËϤ·¡¢
.Nm
´Ø¿ô¤¬
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤Ë
.Dv FTS_NSOK
¤òÀßÄꤷ¤Æ¡¢
.Fa statp
¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤò̤ÄêµÁ¤Î¤Þ¤Þ¤Ë¤¹¤ë¤³¤È¤òµö²Ä¤·¤Þ¤¹¡£
.It Dv FTS_PHYSICAL
¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢
.Nm
¥ë¡¼¥Á¥ó¤Ï¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬»Ø¤¹¥¿¡¼¥²¥Ã¥È¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¯¡¢
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¼«ÂΤÎ
.Fa FTSENT
¹½Â¤ÂΤòÌ᤹¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ë¤È¡¢
³¬Áؤ˸ºß¤¹¤ë¤¹¤Ù¤Æ¤Î¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î
.Fa FTSENT
¹½Â¤ÂΤ¬¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËÌᤵ¤ì¤Þ¤¹¡£
.Fn fts_open
´Ø¿ô¤Ë¤Ï¡¢
.Dv FTS_LOGICAL
¤«
.Dv FTS_PHYSICAL
¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
.It Dv FTS_SEEDOT
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
.Fn fts_open
¤Î¥Ñ¥¹°ú¿ô¤È¤·¤Æ»ØÄꤷ¤Ê¤¤¸Â¤ê¡¢¥Õ¥¡¥¤¥ë³¬Áؤ˸ºß¤¹¤ë¡¢
.Ql .\&
¤â¤·¤¯¤Ï¡¢
.Ql ..\&
¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤ê¡¢
.Nm
¥ë¡¼¥Á¥ó¤Ï¡¢¤³¤Î¤è¤¦¤Ê
¥Õ¥¡¥¤¥ë¤Î
.Fa FTSENT
¹½Â¤ÂΤòÌ᤹¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
.It Dv FTS_XDEV
¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢
.Nm
¤Ï¡¢²¼¹ß¤ò»Ï¤á¤¿¥Õ¥¡¥¤¥ë¤È
°Û¤Ê¤ë¥Ç¥Ð¥¤¥¹ÈÖ¹æ¤ò»ý¤Ä¥Ç¥£¥ì¥¯¥È¥ê¤Ë²¼¹ß¤·¤Þ¤»¤ó¡£
.El
.Pp
°ú¿ô
.Fn compar
¤Ï¡¢³¬Áز£ÃǤνç½ø·è¤á¤Ë»ÈÍѤµ¤ì¤ë¥æ¡¼¥¶ÄêµÁ´Ø¿ô¤ò
»ØÄꤷ¤Þ¤¹¡£¤³¤Î´Ø¿ô¤Ï¡¢
.Fa FTSENT
¹½Â¤ÂΤΥݥ¤¥ó¥¿¤ò»Ø¤¹ 2 ¤Ä¤Î¥Ý¥¤¥ó¥¿¤ò
°ú¿ô¤È¤·¤Æ¼è¤ê¡¢ºÇ½é¤Î°ú¿ô¤¬»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¤¬¡¢2 ÈÖÌܤΰú¿ô¤¬
»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¤è¤êÁ°¤ËÍè¤ë¤«¡¢Á°¤Ç¤â¸å¤í¤Ç¤â¤É¤Á¤é¤Ç¤â¹½¤ï¤Ê¤¤¤«¡¢
¸å¤í¤ËÍè¤ë¤«¤Ë¤è¤Ã¤Æ¡¢¤½¤ì¤¾¤ìÉé¤ÎÃÍ¡¢0¡¢Àµ¤ÎÃͤòÌᤵ¤Í¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
¤³¤ÎÈæ³Ó¤Ç¤Ï¡¢
.Fa FTSENT
¹½Â¤ÂΤÎ
.Fa fts_accpath ,
.Fa fts_path ,
.Fa fts_pathlen
¥Õ¥£¡¼¥ë¥É¤ò
.Em ÀäÂФË
»ÈÍѤ·¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡£
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤Ë
.Dv FTS_NS
¤«
.Dv FTS_NSOK
¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
.Fa fts_statp
¥Õ¥£¡¼¥ë¥É¤â»ÈÍѤ·¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
°ú¿ô
.Fn compar
¤¬
.Dv NULL
¤Ç¤¢¤ë¾ì¹ç¡¢¥Ç¥£¥ì¥¯¥È¥ê²£Ãǽç½ø¤Ï¡¢¥ë¡¼¥È¥Ñ¥¹¤Ç¤Ï
.Fa path_argv
¤Ç¥ê¥¹¥È¤µ¤ì¤ë½ç½ø¤Ë¡¢¤½¤Î
¾¤¹¤Ù¤Æ¤Î¾ì½ê¤Ç¤Ï¡¢¥Ç¥£¥ì¥¯¥È¥ê¤Ç¥ê¥¹¥È¤µ¤ì¤Æ¤¤¤ë½ç½ø¤Ë¤Ê¤ê¤Þ¤¹¡£
.Sh FTS_READ
.Fn fts_read
´Ø¿ô¤Ï¡¢³¬ÁؤΥե¡¥¤¥ë¤òɽ¤¹
.Fa FTSENT
¹½Â¤ÂΤΥݥ¤¥ó¥¿¤òÌᤷ¤Þ¤¹¡£¥Ç¥£¥ì¥¯¥È¥ê
(Æɹþ¤ß²Äǽ¤Ç½Û´Ä¤Î¸¶°ø¤È¤Ê¤é¤Ê¤¤¤â¤Î) ¤Ï¡¢Àµ½çõº÷»þ¤Ë 1 ²ó¤È
µÕ½çõº÷»þ¤Ë 1 ²ó¡¢¾¯¤Ê¤¯¤È¤â 2 ²ó¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤¹¡£
¤½¤Î¾¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢ºÇÄã 1 ²ó¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤¹¡£
(¥Ç¥£¥ì¥¯¥È¥ê´Ö¤Î¥Ï¡¼¥É¥ê¥ó¥¯¤Ç½Û´Ä¤Î¸¶°ø¤È¤Ê¤é¤Ê¤¤¤â¤Î¡¢
¤Þ¤¿¤Ï¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤ËÂФ¹¤ë¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ï¡¢¥Õ¥¡¥¤¥ë¤Î¾ì¹ç¡¢
1 ²ó°Ê¾å¥¢¥¯¥»¥¹¤µ¤ì¤ë¸¶°ø¤È¤Ê¤ê¡¢¥Ç¥£¥ì¥¯¥È¥ê¤Î¾ì¹ç¡¢
2 ²ó°Ê¾å¥¢¥¯¥»¥¹¤µ¤ì¤¿¤ê¤¹¤ë¸¶°ø¤È¤Ê¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£)
.Pp
³¬ÁؤΤ¹¤Ù¤Æ¤Î¥á¥ó¥Ð¤¬Ìᤵ¤ì¤ë¤È¡¢
.Fn fts_read
¤Ï
.Dv NULL
¤òÌᤷ¡¢³°ÉôÊÑ¿ô
.Va errno
¤Ë
0 ¤òÀßÄꤷ¤Þ¤¹¡£³¬ÁØÃæ¤Î¥Õ¥¡¥¤¥ë¤È̵´Ø·¸¤Ê¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¤È¡¢
.Fn fts_read
¤Ï
.Dv NULL
¤òÌᤷ¡¢
.Va errno
¤ËŬÀÚ¤ÊÃͤòÀßÄꤷ¤Þ¤¹¡£Ìᤵ¤ì¤ë¥Õ¥¡¥¤¥ë¤Ë
´Ø·¸¤¹¤ë¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¤È¡¢
.Fa FTSENT
¹½Â¤ÂΤΥݥ¤¥ó¥¿¤¬Ìᤵ¤ì¡¢
.Va errno
¤ÏÀßÄꤵ¤ì¤¿¤êÀßÄꤵ¤ì¤Ê¤«¤Ã¤¿¤ê¤·¤Þ¤¹ (
.Fa fts_info
»²¾È)¡£
.Pp
.Fn fts_read
¤¬Ì᤹
.Fa FTSENT
¹½Â¤ÂΤϡ¢Æ±¤¸¥Õ¥¡¥¤¥ë³¬ÁØ¥¹¥È¥ê¡¼¥à¤ËÂФ·¤Æ
.Fn fts_close
¤ò¸Æ¤Ó½Ð¤·¤¿¸å¡¢¤â¤·¤¯¤Ï¡¢
¤½¤Î¹½Â¤ÂΤ¬¥Ç¥£¥ì¥¯¥È¥ê·¿¥Õ¥¡¥¤¥ë¤òɽ¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë
Ʊ¤¸¥Õ¥¡¥¤¥ë³¬ÁØ¥¹¥È¥ê¡¼¥à¤ËÂФ·¤Æ
.Fn fts_read
¤ò¸Æ¤Ó½Ð¤·¤¿¸å¡¢¾å½ñ¤­¤µ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
¤É¤Á¤é¤Î¾ì¹ç¤Ç¤â¡¢µÕ½çõº÷¤ÎºÝ¤Ë
.Fn fts_read
¤¬
.Fa FTSENT
¤òÊÖ¤·¤¿¸å¤Ë
.Fn fts_read
¤ò¸Æ¤Ó½Ð¤¹¤Þ¤Ç¤Ï¡¢
.Fa FTSENT
¹½Â¤ÂΤϾå½ñ¤­¤µ¤ì¤Þ¤»¤ó¡£
.Sh FTS_CHILDREN
´Ø¿ô
.Fn fts_children
¤Ï¡¢
.Fn fts_read
¤¬ºÇ¶áÌᤷ¤¿
.Fa FTSENT
¹½Â¤ÂΤ¬É½¤¹
¥Ç¥£¥ì¥¯¥È¥ê¤Î¥Õ¥¡¥¤¥ë¤Î
NULL ¤Ç½ª¤ï¤ë¥ê¥ó¥¯¥ê¥¹¥È¤ÎºÇ½é¤Î¥¨¥ó¥È¥ê¤Ç¤¢¤ë
.Fa FTSENT
¹½Â¤ÂΤΥݥ¤¥ó¥¿¤òÌᤷ¤Þ¤¹¡£¥ê¥¹¥È¤Ï¡¢
.Fa FTSENT
¹½Â¤ÂΤÎ
.Fa fts_link
¥Õ¥£¡¼¥ë¥É¤Ç¥ê¥ó¥¯¤µ¤ì¡¢¥æ¡¼¥¶ÄêµÁÈæ³Ó´Ø¿ô¤¬¤¢¤ë¾ì¹ç¤Ï¡¢¤½¤ì¤Ç
½ç½øÉÕ¤±¤é¤ì¤Þ¤¹¡£
.Fn fts_children
¤ò·«¤êÊÖ¤·¸Æ¤Ó½Ð¤¹¤È¡¢¤³¤Î¥ê¥ó¥¯¥ê¥¹¥È¤Ï
¤½¤Î¤¿¤Ó¤ËºÆºîÀ®¤µ¤ì¤Þ¤¹¡£
.Pp
ÆÃÊ̤ʾì¹ç¤È¤·¤Æ¡¢¤½¤Î³¬ÁؤÇ
.Fn fts_read
¤¬¤Þ¤À¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
.Fn fts_children
¤Ï¡¢
.Fn fts_open
¤Ë»ØÄꤵ¤ì¤¿
ÏÀÍý¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ë¥Õ¥¡¥¤¥ë (¤¹¤Ê¤ï¤Á¡¢
.Fn ftp_open
¤Ë»ØÄꤵ¤ì¤¿°ú¿ô) ¤ò»Ø¤¹¥Ý¥¤¥ó¥¿¤òÌᤷ¤Þ¤¹¡£
.Fn fts_read
¤¬¤¹¤Ç¤Ë¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤ë¤È¤­¤Ë¡¢
.Fn fts_read
¤¬ºÇ¶áÌᤷ¤¿
.Fa FTSENT
¹½Â¤ÂΤ¬¡¢Àµ½çõº÷¤Ç¥¢¥¯¥»¥¹¤µ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ê¤¤¤«¡¢
¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Õ¥¡¥¤¥ë¤¬´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
.Fn fts_children
¤Ï
.Dv NULL
¤òÌᤷ¡¢
.Va errno
¤Ë 0 ¤òÀßÄꤷ¤Þ¤¹¡£¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¤È¡¢
.Fn fts_children
¤Ï
.Dv NULL
¤òÌᤷ¡¢
.Va errno
¤ËŬÀÚ¤ÊÃͤòÀßÄꤷ¤Þ¤¹¡£
.Pp
.Fn fts_children
¤¬Ì᤹
.Fa FTSENT
¹½Â¤ÂΤϡ¢Æ±¤¸¥Õ¥¡¥¤¥ë³¬ÁØ¥¹¥È¥ê¡¼¥à¤ò
»ÈÍѤ·¤¿
.Fn fts_children ,
.Fn fts_close ,
.Fn fts_read
¤Î¸Æ¤Ó½Ð¤·¤Î¸å¡¢
¾å½ñ¤­¤µ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
.Pp
.Em option
¤Ë¤Ï¡¢°Ê²¼¤ÎÃͤòÀßÄê¤Ç¤­¤Þ¤¹¡£
.Bl -tag -width FTS_NAMEONLY
.It Dv FTS_NAMEONLY
¥Õ¥¡¥¤¥ë¤Î̾Á°¤À¤±¤¬É¬ÍפǤ¢¤ë¤³¤È¤ò¼¨¤·¤Þ¤¹¡£Ìᤵ¤ì¤¿¹½Â¤ÂΤÎ
¥ê¥ó¥¯¥ê¥¹¥È¤Ë¸ºß¤¹¤ë¤¹¤Ù¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤϡ¢
.Fa fts_name
¥Õ¥£¡¼¥ë¥É¤È
.Fa fts_namelen
¥Õ¥£¡¼¥ë¥É¤ò½ü¤¤¤Æ̤ÄêµÁ¤Ë¤Ê¤ê¤Þ¤¹¡£
.El
.Sh FTS_SET
´Ø¿ô
.Fn fts_set
¤Ë¤è¤ê¡¢¥¹¥È¥ê¡¼¥à
.Fa ftsp
¤Î¥Õ¥¡¥¤¥ë
.Fa f
¤ËÂФ·¤Æ¡¢¤µ¤é¤Ë¹Ô¤Ê¤¦½èÍý¤ò
¥æ¡¼¥¶¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬·è¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
.Fn fts_set
´Ø¿ô¤Ï¡¢ÌäÂ꤬¤Ê¤±¤ì¤Ð
0 ¤òÌᤷ¡¢¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï \-1 ¤òÌᤷ¤Þ¤¹¡£
.Em option
¤È¤·¤Æ¡¢°Ê²¼¤Î¤¦¤Á¤Î 1 ¤Ä¤ÎÃͤò
ÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
.Bl -tag -width FTS_PHYSICAL
.It Dv FTS_AGAIN
¥Õ¥¡¥¤¥ë¤òºÆ¥¢¥¯¥»¥¹¤·¤Þ¤¹¡£¤É¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¥¿¥¤¥×¤Î¥Õ¥¡¥¤¥ë¤â
ºÆ¥¢¥¯¥»¥¹¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£¤½¤Î¼¡¤Ë
.Fn fts_read
¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤Ç¡¢»²¾È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬Ìᤵ¤ì¤Þ¤¹¡£¤½¤Î¤È¤­¡¢¹½Â¤ÂΤÎ
.Fa fts_stat
¥Õ¥£¡¼¥ë¥É¤È
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤¬ºÆ¤Ó½é´ü²½¤µ¤ì¤Þ¤¹¤¬¡¢¤½¤Î¾¤Î¥Õ¥£¡¼¥ë¥É¤ÏÊѹ¹¤µ¤ì¤Þ¤»¤ó¡£
¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢
.Fn fts_read
¤¬ºÇ¶áÌᤷ¤¿¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¤Î¤ß°ÕÌ£¤ò»ý¤Á¤Þ¤¹¡£Ä̾ï¤Î¾ì¹ç¤ÏµÕ½ç
¥Ç¥£¥ì¥¯¥È¥ê¥¢¥¯¥»¥¹¤Ë»ÈÍѤ·¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤¬Àµ½ç¤ÈµÕ½ç¤Î
ξÊý¤ÇºÆ¥¢¥¯¥»¥¹¤µ¤ì¡¢¤½¤Î»Ò¤¹¤Ù¤Æ¤âºÆ¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤¹¡£
.It Dv FTS_FOLLOW
»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¤Ï¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¤¬¡¢
.Fn fts_read
¤ÇºÇ¶áÌᤵ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¾ì¹ç¡¢¼¡¤Ë
.Fn fts_read
¤ò¸Æ¤Ó½Ð¤¹¤È¡¢
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤È
.Fa fts_statp
¥Õ¥£¡¼¥ë¥É¤¬
½é´ü²½¤µ¤ì¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¼«ÂΤǤϤʤ¯¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¥¿¡¼¥²¥Ã¥È¤ò
»Ø¤·¤¿¾õÂ֤ǥե¡¥¤¥ë¤¬Ìᤵ¤ì¤Þ¤¹¡£¥Õ¥¡¥¤¥ë¤¬
.Fn fts_children
¤ÇºÇ¶áÌᤵ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¾ì¹ç¡¢¹½Â¤ÂΤÎ
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤È
.Fa fts_statp
¥Õ¥£¡¼¥ë¥É¤Ï¡¢
.Fn fts_read
¤ÇÌᤵ¤ì¤ë¤È¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¼«ÂΤǤϤʤ¯
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¥¿¡¼¥²¥Ã¥È¤òÈ¿±Ç¤·¤Þ¤¹¡£¤É¤Á¤é¤Î¾ì¹ç¤Ç¤â¡¢
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¥¿¡¼¥²¥Ã¥È¤¬Â¸ºß¤·¤Ê¤±¤ì¤Ð¡¢Ìᤵ¤ì¤ë¹½Â¤ÂΤΥե£¡¼¥ë¥É
¤ÏÊѹ¹¤µ¤ì¤º¡¢
.Fa fts_info
¥Õ¥£¡¼¥ë¥É¤Ï
.Dv FTS_SLNONE
¤ËÀßÄꤵ¤ì¤Þ¤¹¡£
.Pp
¥ê¥ó¥¯¤Î¥¿¡¼¥²¥Ã¥È¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¢¤ë¾ì¹ç¤Ï¡¢Àµ½çõº÷¤Ç¤Î¥ê¥¿¡¼¥ó¡¢
¤¹¤Ù¤Æ¤Î»Ò¹¤Î¥ê¥¿¡¼¥ó¡¢µÕ½çõº÷¤Î¥ê¥¿¡¼¥ó¤¬¤³¤Î½ç½ø¤Ç¼Â¹Ô¤µ¤ì¤Þ¤¹¡£
.It Dv FTS_SKIP
¤³¤Î¥Õ¥¡¥¤¥ë¤Î»Ò¤Ï¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤»¤ó¡£¤³¤³¤Ç»ØÄꤹ¤ë¥Õ¥¡¥¤¥ë¤È¤·¤Æ¡¢
.Fn fts_children
¤«
.Fn fts_read
¤¬ºÇ¶áÌᤷ¤¿¤â¤Î¤É¤Á¤é¤«¤¬²Äǽ¤Ç¤¹¡£
.El
.Sh FTS_CLOSE
´Ø¿ô
.Fn fts_close
¤Ï¡¢¥Õ¥¡¥¤¥ë³¬ÁØ¥¹¥È¥ê¡¼¥à
.Fa ftsp
¤òÊĤ¸¡¢¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤ò¡¢
.Fn fts_open
¤ò¸Æ¤Ó½Ð¤·¤¿»þ¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ËÌᤷ¤Þ¤¹¡£
.Fn fts_close
´Ø¿ô¤Ï¡¢¥¨¥é¡¼¤¬¤Ê¤±¤ì¤Ð 0 ¤òÌᤷ¡¢¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï -1 ¤òÌᤷ¤Þ¤¹¡£
.Sh ¥¨¥é¡¼
.Fn fts_open
´Ø¿ô¤Î¼Â¹Ô¤¬¼ºÇÔ¤·¥¨¥é¡¼¤Ë¤Ê¤ë¤È¡¢¥é¥¤¥Ö¥é¥ê´Ø¿ô
.Xr open 2
¤È
.Xr malloc 3
¤Ç»ØÄꤵ¤ì¤¿¥¨¥é¡¼¤¬
.Va errno
¤ËÀßÄꤵ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
.Pp
.Fn fts_close
´Ø¿ô¤¬¥¨¥é¡¼¤Ë¤Ê¤ë¤È¡¢¥é¥¤¥Ö¥é¥ê´Ø¿ô
.Xr chdir 2
¤È
.Xr close 2
¤¬»ØÄꤷ¤¿¥¨¥é¡¼¤¬
.Va errno
ÀßÄꤵ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
.Pp
.Fn fts_read
´Ø¿ô¤È
.Fn fts_children
´Ø¿ô¤¬¥¨¥é¡¼¤Ë¤Ê¤ë¤È¡¢¥é¥¤¥Ö¥é¥ê´Ø¿ô
.Xr chdir 2 ,
.Xr malloc 3 ,
.Xr opendir 3 ,
.Xr readdir 3 ,
.Xr stat 2
¤Ç»ØÄꤵ¤ì¤¿¥¨¥é¡¼¤¬
.Va errno
¤ËÀßÄꤵ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
.Pp
.Fn fts_children ,
.Fn fts_open ,
.Fn fts_set
¤¬¥¨¥é¡¼¤Ë¤Ê¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ë
.Va errno
¤òÀßÄꤷ¤Þ¤¹¡£
.Bl -tag -width Er
.It Bq Er EINVAL
¥ª¥×¥·¥ç¥ó¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó¡£
.El
.Sh ´ØÏ¢¹àÌÜ
.Xr find 1 ,
.Xr chdir 2 ,
.Xr stat 2 ,
.Xr qsort 3
.Pp
.Sh µ¬³Ê
.Nm
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢¾­Íè¡¢
.St -p1003.1-88
¥ê¥Ó¥¸¥ç¥ó¤ËÁȤ߹þ¤Þ¤ì¤ë¤È»×¤ï¤ì¤Þ¤¹¡£
.\"X kuma 99-10-21