org.jruby.util
Class Dir

java.lang.Object
  extended by org.jruby.util.Dir

public class Dir
extends java.lang.Object

This class exists as a counterpart to the dir.c file in MRI source. It contains many methods useful for File matching and Globbing.

Author:
Ola Bini

Nested Class Summary
static interface Dir.GlobFunc
           
 
Field Summary
static boolean CASEFOLD_FILESYSTEM
           
static boolean DOSISH
           
static byte[] DOUBLE_STAR
           
static byte[] EMPTY
           
static int FNM_CASEFOLD
           
static int FNM_DOTMATCH
           
static int FNM_ERROR
           
static int FNM_NOESCAPE
           
static int FNM_NOMATCH
           
static int FNM_PATHNAME
           
static int FNM_SYSCASE
           
static Dir.GlobFunc glob_caller
           
static Dir.GlobFunc push_pattern
           
static byte[] SLASH
           
static byte[] STAR
           
 
Constructor Summary
Dir()
           
 
Method Summary
static int fnmatch(byte[] bytes, int pstart, int pend, byte[] string, int sstart, int send, int flags)
           
static java.util.List<org.jruby.util.ByteList> push_glob(java.lang.String cwd, org.jruby.util.ByteList globByteList, int flags)
           
static int range(byte[] _pat, int pat, int pend, char test, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOSISH

public static final boolean DOSISH

CASEFOLD_FILESYSTEM

public static final boolean CASEFOLD_FILESYSTEM

FNM_NOESCAPE

public static final int FNM_NOESCAPE
See Also:
Constant Field Values

FNM_PATHNAME

public static final int FNM_PATHNAME
See Also:
Constant Field Values

FNM_DOTMATCH

public static final int FNM_DOTMATCH
See Also:
Constant Field Values

FNM_CASEFOLD

public static final int FNM_CASEFOLD
See Also:
Constant Field Values

FNM_SYSCASE

public static final int FNM_SYSCASE

FNM_NOMATCH

public static final int FNM_NOMATCH
See Also:
Constant Field Values

FNM_ERROR

public static final int FNM_ERROR
See Also:
Constant Field Values

EMPTY

public static final byte[] EMPTY

SLASH

public static final byte[] SLASH

STAR

public static final byte[] STAR

DOUBLE_STAR

public static final byte[] DOUBLE_STAR

push_pattern

public static final Dir.GlobFunc push_pattern

glob_caller

public static final Dir.GlobFunc glob_caller
Constructor Detail

Dir

public Dir()
Method Detail

fnmatch

public static int fnmatch(byte[] bytes,
                          int pstart,
                          int pend,
                          byte[] string,
                          int sstart,
                          int send,
                          int flags)

range

public static int range(byte[] _pat,
                        int pat,
                        int pend,
                        char test,
                        int flags)

push_glob

public static java.util.List<org.jruby.util.ByteList> push_glob(java.lang.String cwd,
                                                                org.jruby.util.ByteList globByteList,
                                                                int flags)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.