1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Modified Sat Jul 24 19:35:54 1993 by Rik Faith (faith@cs.unc.edu)
24 .\" Modified Mon Oct 16 00:16:29 2000 following Joseph S. Myers
26 .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
27 .\" Translated 1998-03-18, NAKANO Takeo <nakano@apm.seikei.ac.jp>
28 .\" Modified 1998-12-18, NAKANO Takeo <nakano@apm.seikei.ac.jp>
29 .\" Updated 2006-03-05, Akihiro MOTOKI, catch up to LDP v2.25
31 .TH FNMATCH 3 2000-10-15 "GNU" "Linux Programmer's Manual"
33 fnmatch \- ファイル名またはパス名へのマッチを行う
36 .B #include <fnmatch.h>
38 .BI "int fnmatch(const char *" "pattern" ", const char *" string ", int " flags );
48 にはシェルのワイルドカードパターンを与える。
53 は以下のフラグのビット毎の OR で指定する。
56 このフラグがセットされていると、バックスラッシュ (\\) をエスケープ文字
65 アスタリスク (*) や疑問符 (?) のメタキャラクタや、
66 スラッシュを含むブラケット表現 ([]) にはマッチさせない。
71 の先頭ピリオド (leading period) は
73 中のピリオドそのものにしかマッチしない。先頭ピリオドとは、
75 の最初の文字位置にあるピリオドのことである。ただし
77 フラグが同時にセットされている場合には、スラッシュの直後に続くピリオド
81 これは \fBFNM_PATHNAME\fR に対する GNU での同義語である.
84 このフラグは GNU での拡張である。これがセットされている場合には、
87 の最初の部分 (にスラッシュを付けたもの) にマッチすれば、
89 このフラグは主として glibc で内部的に使用し、そのためのみ実装されている。
92 このフラグは GNU での拡張である。これがセットされている場合には、
93 パターンのマッチに大文字小文字が区別されない。
98 にマッチすれば 0 を返す。マッチしなかった場合には
100 を返す。エラーの場合にはそれ以外の非ゼロ値を返す。
103 .BR FNM_FILE_NAME ", " FNM_LEADING_DIR ", " FNM_CASEFOLD