1 .\" $NetBSD: fts.3,v 1.13.2.1 1997/11/14 02:09:32 mrg Exp $
3 .\" Copyright (c) 1989, 1991, 1993, 1994
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the University of
17 .\" California, Berkeley and its contributors.
18 .\" 4. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" @(#)fts.3 8.5 (Berkeley) 4/16/94
36 .\" 2007-12-08, mtk, Converted from mdoc to man macros
38 .\" Japanese Version Copyright (c) 2000 Yuichi SATO
39 .\" all rights reserved.
40 .\" Translated Tue Jul 11 19:02:58 JST 2000
41 .\" by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
47 .\"WORD: null-terminated NULL 終端された
49 .TH FTS 3 2007-12-28 "Linux" "Linux Programmer's Manual"
52 .\"O fts, fts_open, fts_read, fts_children, fts_set, fts_close \- \
53 .\"O traverse a file hierarchy
54 fts, fts_open, fts_read, fts_children, fts_set, fts_close \- \
59 .B #include <sys/types.h>
60 .B #include <sys/stat.h>
63 .BI "FTS *fts_open(char * const *" path_argv ", int " options ", "
64 .BI " int (*" compar ")(const FTSENT **, const FTSENT **));"
66 .BI "FTSENT *fts_read(FTS *" ftsp );
68 .BI "FTSENT *fts_children(FTS *" ftsp ", int " options );
70 .BI "int fts_set(FTS *" ftsp ", FTSENT *" f ", int " options );
72 .BI "int fts_close(FTS *" ftsp );
77 .\"O fts functions are provided for traversing
78 .\"O file hierarchies.
79 .\"O A simple overview is that the
81 .\"O function returns a "handle" on a file hierarchy, which is then supplied to
84 fts 関数群は、ファイル階層をたどるために提供されている。
87 関数は、他の fts 関数群に渡すための、ファイル階層の「ハンドル」を返す。
90 .\"O returns a pointer to a structure describing one of the files in the file
93 .\"O .BR fts_children ()
94 .\"O returns a pointer to a linked list of structures, each of which describes
95 .\"O one of the files contained in a directory in the hierarchy.
96 .\"O In general, directories are visited two distinguishable times; in preorder
97 .\"O (before any of their descendants are visited) and in postorder (after all
98 .\"O of their descendants have been visited).
99 .\"O Files are visited once.
100 .\"O It is possible to walk the hierarchy "logically" (ignoring symbolic links)
101 .\"O or physically (visiting symbolic links), order the walk of the hierarchy or
102 .\"O prune and/or revisit portions of the hierarchy.
104 関数は、ファイル階層中にある 1 つのファイルを記述する構造体へのポインタを返す。
106 関数は、階層中のディレクトリにあるファイルを記述する構造体の
109 preorder (正方向:下の階層のディレクトリをたどる前) と
110 postorder (逆方向:下の階層のディレクトリをすべてたどった後) という、
111 異なる方向で 2 回たどられる。ファイルは 1 回たどられる。
112 ディレクトリ階層を「論理的に」(シンボリックリングを無視して) 移動することも、
113 物理的に (シンボリックリンクをたどって) 移動することも可能である。
115 余分なものを取り除くこと・階層の一部を再びたどることが可能である。
117 .\"O Two structures are defined (and typedef'd) in the include file
121 .\"O the structure that represents the file hierarchy itself.
124 .\"O the structure that represents a file in the file
128 .\"O structure is returned for every file in the file
130 .\"O In this manual page, "file" and
131 .\"O "FTSENT structure"
132 .\"O are generally interchangeable.
135 .\"O structure contains at least the following fields, which are
136 .\"O described in greater detail below:
139 で定義されている (さらに typedef されている)。
140 1 つ目は、ファイル階層そのものを表現する
143 2 つ目は、ファイル階層中のファイルを表現する
147 構造体は通常、ファイル階層中のすべてのファイルに対して返される。
152 構造体は、少なくとも次のようなフィールドを持っており、
157 .\"O typedef struct _ftsent {
158 .\"O unsigned short fts_info; /* flags for FTSENT structure */
159 .\"O char *fts_accpath; /* access path */
160 .\"O char *fts_path; /* root path */
161 .\"O short fts_pathlen; /* strlen(fts_path) */
162 .\"O char *fts_name; /* filename */
163 .\"O short fts_namelen; /* strlen(fts_name) */
164 .\"O short fts_level; /* depth (\-1 to N) */
165 .\"O int fts_errno; /* file errno */
166 .\"O long fts_number; /* local numeric value */
167 .\"O void *fts_pointer; /* local address value */
168 .\"O struct ftsent *fts_parent; /* parent directory */
169 .\"O struct ftsent *fts_link; /* next file structure */
170 .\"O struct ftsent *fts_cycle; /* cycle structure */
171 .\"O struct stat *fts_statp; /* stat(2) information */
173 typedef struct _ftsent {
174 unsigned short fts_info; /* FTSENT 構造体のためのフラグ */
175 char *fts_accpath; /* アクセスパス */
176 char *fts_path; /* ルートパス */
177 short fts_pathlen; /* fts_path の長さ */
178 char *fts_name; /* ファイル名 */
179 short fts_namelen; /* fts_name の長さ */
180 short fts_level; /* 深さ (\-1 〜 N) */
181 int fts_errno; /* ファイルのエラー番号 */
182 long fts_number; /* ローカルな番号 */
183 void *fts_pointer; /* ローカルなアドレス番号 */
184 struct ftsent *fts_parent; /* 親ディレクトリ */
185 struct ftsent *fts_link; /* 次のファイル構造体 */
186 struct ftsent *fts_cycle; /* 循環している構造体 */
187 struct stat *fts_statp; /* stat(2) の情報 */
192 .\"O These fields are defined as follows:
193 これらのフィールドは、次のように定義されている。
194 .\" .Bl -tag -width "fts_namelen"
197 .\"O One of the following flags describing the returned
200 .\"O the file it represents.
201 .\"O With the exception of directories without errors
204 .\"O entries are terminal, that is, they will not be revisited, nor will any
205 .\"O of their descendants be visited.
208 構造体とファイルを説明する以下のフラグのいずれかを表している。
211 の場合は例外として、それ以外のすべてのエントリは終端である。
212 つまり、エントリは再びたどられることもなく、
214 .\" .Bl -tag -width FTS_DEFAULT
218 .\"O A directory being visited in preorder.
219 preorder でたどられるディレクトリ。
222 .\"O A directory that causes a cycle in the tree.
227 .\"O structure will be filled in as well.)
237 .\"O structure that represents a file type not explicitly described
238 .\"O by one of the other
245 の他のいずれかの値で明示的に説明されていない。
248 .\"O A directory which cannot be read.
249 .\"O This is an error return, and the
251 .\"O field will be set to indicate what caused the error.
263 .\"O which was not specified as a filename to
266 .\"O .BR FTS_SEEDOT ).
275 .\"O A directory being visited in postorder.
276 .\"O The contents of the
278 .\"O structure will be unchanged from when
279 .\"O it was returned in preorder, that is, with the
283 postorder でたどられるディレクトリ。
285 構造体の内容は、preorder のときに返された状態
290 に設定されている状態) から変更されない。
293 .\"O This is an error return, and the
295 .\"O field will be set to indicate what caused the error.
298 フィールドは、何がエラーを起こしたかを示す値に設定される。
305 .\"O A file for which no
307 .\"O information was available.
308 .\"O The contents of the
310 .\"O field are undefined.
311 .\"O This is an error return, and the
313 .\"O field will be set to indicate what caused the error.
320 フィールドは、何がエラーを起こしたかを示す値に設定される。
323 .\"O A file for which no
325 .\"O information was requested.
326 .\"O The contents of the
328 .\"O field are undefined.
335 .\"O A symbolic link.
339 .\"O A symbolic link with a non-existent target.
340 .\"O The contents of the
342 .\"O field reference the file characteristic information for the symbolic link
346 フィールドの内容は、シンボリックリンクそのもののファイル特性情報を参照する。
351 .\"O A path for accessing the file from the current directory.
352 現在のディレクトリからファイルにアクセスするためのパス。
355 .\"O The path for the file relative to the root of the traversal.
356 .\"O This path contains the path specified to
359 階層をたどるときのルートからみたファイルの相対的なパス。
362 に指定したパスがプレフィックスとして含まれる。
365 .\"O The length of the string referenced by
371 .\"O The name of the file.
375 .\"O The length of the string referenced by
381 .\"O The depth of the traversal, numbered from \-1 to N, where this file
385 .\"O structure representing the parent of the starting point (or root)
386 .\"O of the traversal is numbered \-1, and the
388 .\"O structure for the root
389 .\"O itself is numbered 0.
390 階層をたどって、このファイルがみつかった深さ。
392 階層をたどるときの出発点 (ルート) の親ディレクトリを表す
400 .\"O Upon return of a
402 .\"O structure from the
403 .\"O .BR fts_children ()
406 .\"O functions, with its
415 .\"O field contains the value of the external variable
417 .\"O specifying the cause of the error.
418 .\"O Otherwise, the contents of the
420 .\"O field are undefined.
443 .\"O This field is provided for the use of the application program and is
444 .\"O not modified by the
446 .\"O It is initialized to 0.
447 このフィールドは、アプリケーションプログラムから使用するために提供され、
452 .\"O This field is provided for the use of the application program and is
453 .\"O not modified by the
455 .\"O It is initialized to
457 このフィールドは、アプリケーションプログラムから使用するために提供され、
464 .\"O A pointer to the
466 .\"O structure referencing the file in the hierarchy
467 .\"O immediately above the current file, that is, the directory of which this
468 .\"O file is a member.
469 .\"O A parent structure for the initial entry point is provided as well,
470 .\"O however, only the
475 .\"O fields are guaranteed to be initialized.
476 現在のファイルのすぐ上の階層にあるファイル
477 (つまり、現在のファイルがメンバーになっているディレクトリ) を参照する
480 最初の出発点に対しても、親となる構造体は与えられる。
488 .\"O Upon return from the
489 .\"O .BR fts_children ()
492 .\"O field points to the next structure in the NULL-terminated linked list of
493 .\"O directory members.
494 .\"O Otherwise, the contents of the
496 .\"O field are undefined.
500 フィールドはディレクトリメンバーの NUL 終端されたリンクリストの形式で、
507 .\"O If a directory causes a cycle in the hierarchy (see
510 .\"O of a hard link between two directories, or a symbolic link pointing to a
513 .\"O field of the structure will point to the
515 .\"O structure in the hierarchy that references the same file as the current
518 .\"O Otherwise, the contents of the
520 .\"O field are undefined.
521 2 つのディレクトリにハードリンクが張られているため、
522 または、シンボリックリンクがあるディレクトリを指しているために、
523 ディレクトリが循環する階層構造を作っている場合
540 .\"O information for the file.
546 .\"O A single buffer is used for all of the paths of all of the files in the
552 .\"O fields are guaranteed to be
555 .\"O for the file most recently returned by
556 .\"O .BR fts_read ().
557 .\"O To use these fields to reference any files represented by other
559 .\"O structures will require that the path buffer be modified using the
560 .\"O information contained in that
565 .\"O Any such modifications should be undone before further calls to
571 .\"O null-terminated.
572 ファイル階層中のすべてのファイルのパスに対して、
580 によって返された最も新しいファイルに対して「のみ」
584 構造体で表現されるファイルを参照するために使うには、
588 フィールドにある情報を使ってパスのバッファーを修正する必要がある。
591 を呼び出そうとする場合には、元に戻しておかなければならない。
599 .\"O function takes a pointer to an array of character pointers naming one
600 .\"O or more paths which make up a logical file hierarchy to be traversed.
601 .\"O The array must be terminated by a
605 関数は、文字列ポインタの配列へのポインタを引き数に取る。
606 この文字列ポインタは、論理ファイル階層をつくる 1 つ以上のパスの名前になる。
612 .\"O a number of options, at least one of which (either
615 .\"O .BR FTS_PHYSICAL )
616 .\"O must be specified.
617 .\"O The options are selected by ORing
618 .\"O the following values:
619 多くのオプションがあり、少なくとも 1 つ
624 オプションは以下の値の論理和をとって選択する。
625 .\" .Bl -tag -width "FTS_PHYSICAL"
628 .\"O This option causes any symbolic link specified as a root path to be
629 .\"O followed immediately whether or not
631 .\"O is also specified.
635 ルートパスに指定されたシンボリックリンクをすぐにたどらせる。
638 .\"O This option causes the
639 .\"O fts routines to return
641 .\"O structures for the targets of symbolic links
642 .\"O instead of the symbolic links themselves.
643 .\"O If this option is set, the only symbolic links for which
646 .\"O are returned to the application are those referencing non-existent files.
652 .\"O be provided to the
656 fts ルーチンにシンボリックリンクそのものではなく、
663 シンボリックリンクのみが、存在しないファイルを参照している。
672 .\"O As a performance optimization, the
673 .\"O fts functions change directories as they walk the file hierarchy.
674 .\"O This has the side-effect that an application cannot rely on being
675 .\"O in any particular directory during the traversal.
678 .\"O option turns off this optimization, and the
679 .\"O fts functions will not change the current directory.
680 .\"O Note that applications should not themselves change their current directory
681 .\"O and try to access files unless
683 .\"O is specified and absolute
684 .\"O pathnames were provided as arguments to
685 .\"O .BR fts_open ().
687 fts 関数群はファイル階層をたどるときディレクトリを変える。
689 アプリケーションがある特定のディレクトリにいるということに
693 fts 関数群は現在のディレクトリを変更しない。
697 の引き数として絶対パス名が与えられたとき以外、アプリケーションは、
699 ファイルにアクセスしたりすべきではない、という点に注意すること。
702 .\"O By default, returned
704 .\"O structures reference file characteristic information (the
706 .\"O field) for each file visited.
707 .\"O This option relaxes that requirement as a performance optimization,
709 .\"O fts functions to set the
713 .\"O and leave the contents of the
715 .\"O field undefined.
718 構造体は、たどられた各ファイルについてのファイル特徴情報
728 の内容を定義されないままにすることを許すことにより、
729 パフォーマンスの最適化に必要なものを緩和する。
732 .\"O This option causes the
733 .\"O fts routines to return
735 .\"O structures for symbolic links themselves instead
736 .\"O of the target files they point to.
737 .\"O If this option is set,
739 .\"O structures for all symbolic links in the
740 .\"O hierarchy are returned to the application.
746 .\"O be provided to the
750 fts ルーチンにシンボリックリンクが指しているファイルではなく、
754 このオプションが設定されると、階層中のすべてのシンボリックリンクの
765 .\"O By default, unless they are specified as path arguments to
766 .\"O .BR fts_open (),
771 .\"O encountered in the file hierarchy are ignored.
772 .\"O This option causes the
773 .\"O fts routines to return
775 .\"O structures for them.
778 のパス引き数として指定されない限り、ファイル階層中にある
779 "." または ".." という名前のファイルは無視される。
786 .\"O This option prevents
787 .\"O fts from descending into directories that have a different device number
788 .\"O than the file from which the descent began.
790 fts が下り始めのファイルとは異なるデバイス番号を持っている
796 .\"O specifies a user-defined function which may be used to order the traversal
797 .\"O of the hierarchy.
799 .\"O takes two pointers to pointers to
801 .\"O structures as arguments and
802 .\"O should return a negative value, zero, or a positive value to indicate
803 .\"O if the file referenced by its first argument comes before, in any order
804 .\"O with respect to, or after, the file referenced by its second argument.
806 .\"O .IR fts_accpath ,
814 .\"O be used in this comparison.
823 .\"O field may not either.
828 .\"O the directory traversal order is in the order listed in
830 .\"O for the root paths, and in the order listed in the directory for
831 .\"O everything else.
834 は、階層をたどる順番を決めるのに使われるユーザー定義関数を指定する。
837 構造体のポインタのポインタを 2 つとり、
838 1 番目の引き数で参照されているファイルが
839 2 番目の引き数で参照されているファイルより
840 前にある場合は負の値・同じ場合はゼロ・後にある場合は正の値を
847 フィールドは、この比較に「絶対」使ってはいけない。
859 の場合、ディレクトリをたどる順番は、ルートパスについては
862 その他のファイルについてはディレクトリ内でリストされた順番となる。
866 .\"O function returns a pointer to an
868 .\"O structure describing a file in
870 .\"O Directories (that are readable and do not cause cycles) are visited at
871 .\"O least twice, once in preorder and once in postorder.
872 .\"O All other files are visited at least once.
873 .\"O (Hard links between directories that do not cause cycles or symbolic
874 .\"O links to symbolic links may cause files to be visited more than once,
875 .\"O or directories more than twice.)
880 (読み込み可能で、循環していない) ディレクトリは、
881 1 回は preorder で、もう 1 回は postorder で、少なくとも 2 回たどられる。
882 他のファイルは、少なくとも 1 回たどられる。
884 循環やシンボリックリンクへのシンボリックリンクが起こらない場合、
885 ファイルは 2 回以上、ディレクトリは 3 回以上たどられる。)
887 .\"O If all the members of the hierarchy have been returned,
891 .\"O and sets the external variable
894 .\"O If an error unrelated to a file in the hierarchy occurs,
901 .\"O If an error related to a returned file occurs, a pointer to an
903 .\"O structure is returned, and
905 .\"O may or may not have been set (see
914 階層中のファイルに関係しないエラーが起こった場合、
921 階層中のファイルに関係したエラーが起こった場合、
931 .\"O structures returned by
933 .\"O may be overwritten after a call to
934 .\"O .BR fts_close ()
935 .\"O on the same file hierarchy stream, or, after a call to
937 .\"O on the same file hierarchy stream unless they represent a file of type
938 .\"O directory, in which case they will not be overwritten until after a call to
942 .\"O structure has been returned by the function
953 の呼出しの後でも、構造体がディレクトリを表現していない限り上書きされる。
964 .\"O .BR fts_children ()
965 .\"O function returns a pointer to an
967 .\"O structure describing the first entry in a NULL-terminated linked list of
968 .\"O the files in the directory represented by the
970 .\"O structure most recently returned by
971 .\"O .BR fts_read ().
972 .\"O The list is linked through the
976 .\"O structure, and is ordered by the user-specified comparison function, if any.
977 .\"O Repeated calls to
978 .\"O .BR fts_children ()
979 .\"O will recreate this linked list.
988 構造体で表現されるディレクトリにあるファイルの)
989 NUL 終端されたリンクリストの最初のエントリを記述する。
995 ユーザー指定の比較関数がある場合は、それで順序づけられる。
1000 .\"O As a special case, if
1001 .\"O .BR fts_read ()
1002 .\"O has not yet been called for a hierarchy,
1003 .\"O .BR fts_children ()
1004 .\"O will return a pointer to the files in the logical directory specified to
1005 .\"O .BR fts_open (),
1006 .\"O that is, the arguments specified to
1007 .\"O .BR fts_open ().
1008 .\"O Otherwise, if the
1010 .\"O structure most recently returned by
1011 .\"O .BR fts_read ()
1012 .\"O is not a directory being visited in preorder,
1013 .\"O or the directory does not contain any files,
1014 .\"O .BR fts_children ()
1020 .\"O If an error occurs,
1021 .\"O .BR fts_children ()
1029 がファイル階層について呼ばれていない場合、
1033 に指定された論理ディレクトリ (つまり、
1035 に指定された引き数) の中にあるファイルへのポインタを返す。
1040 構造体が preorder でたどられたディレクトリでない場合や
1058 .\"O structures returned by
1059 .\"O .BR fts_children ()
1060 .\"O may be overwritten after a call to
1061 .\"O .BR fts_children (),
1062 .\"O .BR fts_close ()
1064 .\"O .BR fts_read ()
1065 .\"O on the same file hierarchy stream.
1069 構造体は、同じファイル階層ストリームへの
1070 .BR fts_children (),
1076 .\"O may be set to the following value:
1079 .\" .Bl -tag -width FTS_NAMEONLY
1082 .\"O Only the names of the files are needed.
1083 .\"O The contents of all the fields in the returned linked list of structures
1084 .\"O are undefined with the exception of the
1094 すべてのフィールドの内容は定義されない。
1099 .\"O allows the user application to determine further processing for the
1107 .\"O returns 0 on success, and \-1 if an error occurs.
1109 .\"O must be set to one of the following values:
1119 関数は、成功した場合は 0 を、エラーが起こった場合は \-1 を返す。
1121 は、次の値のいずれか 1 つに設定されなければならない。
1122 .\" .Bl -tag -width FTS_PHYSICAL
1125 .\"O Re-visit the file; any file type may be revisited.
1126 .\"O The next call to
1127 .\"O .BR fts_read ()
1128 .\"O will return the referenced file.
1133 .\"O fields of the structure will be reinitialized at that time,
1134 .\"O but no other fields will have been changed.
1135 .\"O This option is meaningful only for the most recently returned
1137 .\"O .BR fts_read ().
1138 .\"O Normal use is for postorder directory visits, where it causes the
1139 .\"O directory to be revisited (in both preorder and postorder) as well as all
1140 .\"O of its descendants.
1141 ファイルを再びたどる。すべてのファイルタイプが再びたどられる。
1144 の呼出しにより、参照されているファイルが返される。
1148 フィールドはこの時に初期化されるが、他のフィールドは変更されない。
1151 によって最も新しく返されたファイルについてのみ意味を持つ。
1152 通常は、postorder でディレクトリをたどる場合に使用し、
1154 ディレクトリを (preorder と postorder の両方で) 再びたどらせる。
1157 .\"O The referenced file must be a symbolic link.
1158 .\"O If the referenced file is the one most recently returned by
1159 .\"O .BR fts_read (),
1160 .\"O the next call to
1162 .\"O .BR fts_read ()
1163 .\"O returns the file with the
1167 .\"O fields reinitialized to reflect the target of the symbolic link instead
1168 .\"O of the symbolic link itself.
1169 .\"O If the file is one of those most recently returned by
1170 .\"O .BR fts_children (),
1175 .\"O fields of the structure, when returned by
1176 .\"O .BR fts_read (),
1177 .\"O will reflect the target of the symbolic link instead of the symbolic link
1179 .\"O In either case, if the target of the symbolic link does not exist the
1180 .\"O fields of the returned structure will be unchanged and the
1182 .\"O field will be set to
1183 .\"O .BR FTS_SLNONE .
1185 .\"O If the target of the link is a directory, the preorder return, followed
1186 .\"O by the return of all of its descendants, followed by a postorder return,
1188 参照されてるファイルは、シンボリックリンクでなければならない。
1191 によって最も新しく返されたものである場合、次の
1193 の呼出しでは、シンボリックリンクそのものではなく、
1194 シンボリックリンクが指している先を反映するように
1200 によって最も新しく返されたものの 1 つである場合、
1205 フィールドは、シンボリックリンクそのものではなく、
1206 シンボリックリンクが指している先を反映する。
1207 どちらの場合でも、シンボリックリンクが指している先がないときは、
1208 返された構造体のフィールドは変更されず、
1214 .\"O If the target of the link is a directory, the preorder return, followed
1215 .\"O by the return of all of its descendants, followed by a postorder return,
1218 ファイルが preorder で返された後、下の階層のすべてファイルが返され、
1219 その後で postorder で返される。
1222 .\"O No descendants of this file are visited.
1223 .\"O The file may be one of those most recently returned by either
1224 .\"O .BR fts_children ()
1226 .\"O .BR fts_read ().
1232 のどちらかによって最も新しく返されたものの 1 つである。
1236 .\"O .BR fts_close ()
1237 .\"O function closes a file hierarchy stream
1239 .\"O and restores the current directory to the directory from which
1240 .\"O .BR fts_open ()
1241 .\"O was called to open
1244 .\"O .BR fts_close ()
1246 .\"O returns 0 on success, and \-1 if an error occurs.
1256 関数は、成功した場合は 0 を、エラーが起こった場合は \-1 を返す。
1260 .\"O .BR fts_open ()
1261 .\"O may fail and set
1263 .\"O for any of the errors specified for the library functions
1266 .\"O .BR malloc (3).
1278 .\"O .BR fts_close ()
1279 .\"O may fail and set
1281 .\"O for any of the errors specified for the library functions
1296 .\"O .BR fts_read ()
1298 .\"O .BR fts_children ()
1299 .\"O may fail and set
1301 .\"O for any of the errors specified for the library functions
1303 .\"O .BR malloc (3),
1304 .\"O .BR opendir (3),
1305 .\"O .BR readdir (3)
1323 .\"O .BR fts_children (),
1324 .\"O .BR fts_open ()
1327 .\"O may fail and set
1331 .BR fts_children (),
1339 .\"O The options were invalid.
1343 .\"O These functions are available in Linux since glibc2.
1344 これらの関数は、Linux では glibc2 から使用可能である。
1345 .\"O SH "CONFORMING TO"
1348 .\" The following statement is years old, and seems no closer to
1349 .\" being true -- mtk
1352 .\"O .\" utility is expected to be included in a future
1358 .\" リビジョンに含まれると期待されている。