Class Dir

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

public class Dir extends 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
  • Field Details

    • DOSISH

      public static final boolean DOSISH
    • CASEFOLD_FILESYSTEM

      public static final boolean CASEFOLD_FILESYSTEM
    • FNM_NOESCAPE

      public static final int FNM_NOESCAPE
      See Also:
    • FNM_PATHNAME

      public static final int FNM_PATHNAME
      See Also:
    • FNM_DOTMATCH

      public static final int FNM_DOTMATCH
      See Also:
    • FNM_CASEFOLD

      public static final int FNM_CASEFOLD
      See Also:
    • FNM_GLOB_SKIPDOT

      public static final int FNM_GLOB_SKIPDOT
      See Also:
    • FNM_SYSCASE

      public static final int FNM_SYSCASE
    • FNM_NOMATCH

      public static final int FNM_NOMATCH
      See Also:
    • FNM_ERROR

      public static final int FNM_ERROR
      See Also:
    • 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
  • Constructor Details

    • Dir

      public Dir()
  • Method Details

    • fnmatch

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

      public static int fnmatch(byte[] bytes, int pstart, int pend, byte[] string, int sstart, int send, int flags, org.jcodings.Encoding enc)
    • push_glob

      public static List<ByteList> push_glob(Ruby runtime, String cwd, ByteList globByteList, int flags, boolean sort)
    • braces

      public static ArrayList<String> braces(String pattern, int flags, ArrayList<String> patterns)
    • range

      @Deprecated public static int range(byte[] _pat, int pat, int pend, char test, int flags)
      Deprecated.
      No replacement; not intended to be made public