mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dir.c: Updated RDocs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
92f0be2037
commit
c2642b2c3f
2 changed files with 35 additions and 25 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Mon Apr 19 18:27:26 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
|
* dir.c: Updated RDocs.
|
||||||
|
|
||||||
Mon Apr 19 08:19:11 2004 Doug Kearns <djkea2@mugca.its.monash.edu.au>
|
Mon Apr 19 08:19:11 2004 Doug Kearns <djkea2@mugca.its.monash.edu.au>
|
||||||
|
|
||||||
* dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,
|
* dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,
|
||||||
|
|
56
dir.c
56
dir.c
|
@ -1503,7 +1503,8 @@ dir_s_aref(obj, str)
|
||||||
* block. Note that this pattern is not a regexp (it's closer to a
|
* block. Note that this pattern is not a regexp (it's closer to a
|
||||||
* shell glob). See <code>File::fnmatch</code> for
|
* shell glob). See <code>File::fnmatch</code> for
|
||||||
* details of file name matching and the meaning of the <i>flags</i>
|
* details of file name matching and the meaning of the <i>flags</i>
|
||||||
* parameter.
|
* parameter. Note that case sensitivity depends on your system. (so
|
||||||
|
* <code>File::FNM_CASEFOLD</code> is ignored)
|
||||||
*
|
*
|
||||||
* Dir["config.?"] #=> ["config.h"]
|
* Dir["config.?"] #=> ["config.h"]
|
||||||
* Dir.glob("config.?") #=> ["config.h"]
|
* Dir.glob("config.?") #=> ["config.h"]
|
||||||
|
@ -1593,33 +1594,38 @@ dir_entries(io, dirname)
|
||||||
* <i>flags</i> is a bitwise OR of the <code>FNM_xxx</code> parameters.
|
* <i>flags</i> is a bitwise OR of the <code>FNM_xxx</code> parameters.
|
||||||
* The same glob pattern and flags are used by <code>Dir::glob</code>.
|
* The same glob pattern and flags are used by <code>Dir::glob</code>.
|
||||||
*
|
*
|
||||||
* File.fnmatch('cat', 'cat') #=> true
|
* File.fnmatch('cat', 'cat') #=> true : match entire string
|
||||||
* File.fnmatch('cat', 'category') #=> false
|
* File.fnmatch('cat', 'category') #=> false : only match partial string
|
||||||
* File.fnmatch('c{at,ub}s', 'cats') #=> false
|
* File.fnmatch('c{at,ub}s', 'cats') #=> false : { } isn't supported
|
||||||
* File.fnmatch('c{at,ub}s', 'cubs') #=> false
|
|
||||||
* File.fnmatch('c{at,ub}s', 'cat') #=> false
|
|
||||||
*
|
*
|
||||||
* File.fnmatch('c?t', 'cat') #=> true
|
* File.fnmatch('c?t', 'cat') #=> true : '?' match only 1 character
|
||||||
* File.fnmatch('c\?t', 'cat') #=> false
|
* File.fnmatch('c??t', 'cat') #=> false : ditto
|
||||||
* File.fnmatch('c??t', 'cat') #=> false
|
* File.fnmatch('c*', 'cats') #=> true : '*' match 0 or more characters
|
||||||
* File.fnmatch('c*', 'cats') #=> true
|
* File.fnmatch('ca[a-z]', 'cat') #=> true : inclusive bracket expression
|
||||||
* File.fnmatch('c/ * FIXME * /t', 'c/a/b/c/t') #=> true
|
* File.fnmatch('ca[^t]', 'cat') #=> false : exclusive bracket expression ('^' or '!')
|
||||||
* File.fnmatch('c*t', 'cat') #=> true
|
|
||||||
* File.fnmatch('c\at', 'cat') #=> true
|
|
||||||
* File.fnmatch('c\at', 'cat', File::FNM_NOESCAPE) #=> false
|
|
||||||
* File.fnmatch('a?b', 'a/b') #=> true
|
|
||||||
* File.fnmatch('a?b', 'a/b', File::FNM_PATHNAME) #=> false
|
|
||||||
*
|
*
|
||||||
* File.fnmatch('*', '.profile') #=> false
|
* File.fnmatch('?', '/', File::FNM_PATHNAME) #=> false : wildcard doesn't match '/' on FNM_PATHNAME
|
||||||
* File.fnmatch('*', '.profile', File::FNM_DOTMATCH) #=> true
|
* File.fnmatch('*', '/', File::FNM_PATHNAME) #=> false : ditto
|
||||||
* File.fnmatch('*', 'dave/.profile') #=> true
|
* File.fnmatch('[/]', '/', File::FNM_PATHNAME) #=> false : ditto
|
||||||
* File.fnmatch('*', 'dave/.profile', File::FNM_DOTMATCH) #=> true
|
|
||||||
* File.fnmatch('*', 'dave/.profile', File::FNM_PATHNAME) #=> false
|
|
||||||
* File.fnmatch('* / FIXME *', 'dave/.profile', File::FNM_PATHNAME) #=> false
|
|
||||||
* STRICT = File::FNM_PATHNAME | File::FNM_DOTMATCH
|
|
||||||
* File.fnmatch('* / FIXME *', 'dave/.profile', STRICT) #=> true
|
|
||||||
*
|
*
|
||||||
* File.fnmatch('** ERASEME /t', 'c/a/b/c/t', File::FNM_PATHNAME) #=> true
|
* File.fnmatch('\?', '?') #=> true : escaped wildcard becomes ordinary
|
||||||
|
* File.fnmatch('\a', 'a') #=> true : escaped ordinary remains ordinary
|
||||||
|
* File.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true : FNM_NOESACPE makes '\' ordinary
|
||||||
|
* File.fnmatch('[\?]', '?') #=> true : can escape inside bracket expression
|
||||||
|
*
|
||||||
|
* File.fnmatch('*', '.profile') #=> false : wildcard doesn't match leading
|
||||||
|
* File.fnmatch('*', '.profile', File::FNM_DOTMATCH) #=> true period by default.
|
||||||
|
* File.fnmatch('.*' '.profile') #=> true
|
||||||
|
*
|
||||||
|
* File.fnmatch('*', 'dave/.profile') #=> true
|
||||||
|
* File.fnmatch('* IGNORE /*', 'dave/.profile', File::FNM_PATHNAME) #=> false
|
||||||
|
* File.fnmatch('* IGNORE /*', 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true
|
||||||
|
*
|
||||||
|
* File.fnmatch('** IGNORE /foo', 'a/b/c/foo', File::FNM_PATHNAME) #=> true
|
||||||
|
* File.fnmatch('** IGNORE /foo', '/a/b/c/foo', File::FNM_PATHNAME) #=> true
|
||||||
|
* File.fnmatch('** IGNORE /foo', 'c:/a/b/c/foo', File::FNM_PATHNAME) #=> true
|
||||||
|
* File.fnmatch('** IGNORE /foo', 'a/.b/c/foo', File::FNM_PATHNAME) #=> false
|
||||||
|
* File.fnmatch('** IGNORE /foo', 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
file_s_fnmatch(argc, argv, obj)
|
file_s_fnmatch(argc, argv, obj)
|
||||||
|
|
Loading…
Reference in a new issue