public class Dir
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
Dir.DirGlobber |
private static class |
Dir.GlobArgs |
static interface |
Dir.GlobFunc<T> |
private static class |
Dir.GlobPattern |
| Modifier and Type | Field and Description |
|---|---|
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 |
private static Dir.GlobFunc<Dir.GlobArgs> |
glob_caller |
(package private) static Dir.GlobFunc<java.util.List<org.jruby.util.ByteList>> |
push_pattern |
static byte[] |
SLASH |
static byte[] |
STAR |
| Constructor and Description |
|---|
Dir() |
| Modifier and Type | Method and Description |
|---|---|
private static int |
addToResultIfExists(jnr.posix.POSIX posix,
java.lang.String cwd,
byte[] bytes,
int begin,
int end,
int flags,
Dir.GlobFunc<Dir.GlobArgs> func,
Dir.GlobArgs arg) |
private static boolean |
beginsWithDriveLetter(byte[] path,
int begin,
int end) |
private static byte[] |
extract_elem(byte[] bytes,
int begin,
int end) |
private static byte[] |
extract_path(byte[] bytes,
int begin,
int end) |
private static java.lang.String[] |
files(FileResource directory) |
private static int |
fnmatch_helper(byte[] bytes,
int pstart,
int pend,
byte[] string,
int sstart,
int send,
int flags) |
static int |
fnmatch(byte[] bytes,
int pstart,
int pend,
byte[] string,
int sstart,
int send,
int flags) |
private static byte[] |
getBytesInUTF8(java.lang.String str) |
private static int |
glob_helper(jnr.posix.POSIX posix,
java.lang.String cwd,
byte[] path,
int begin,
int end,
int sub,
int flags,
Dir.GlobFunc<Dir.GlobArgs> func,
Dir.GlobArgs arg) |
private static int |
glob_helper(jnr.posix.POSIX posix,
java.lang.String cwd,
org.jruby.util.ByteList path,
int sub,
int flags,
Dir.GlobFunc<Dir.GlobArgs> func,
Dir.GlobArgs arg) |
private static boolean |
has_magic(byte[] bytes,
int begin,
int end,
int flags) |
private static int |
indexOf(byte[] bytes,
int begin,
int end,
byte ch) |
private static boolean |
isAbsolutePath(byte[] path,
int begin,
int length) |
private static boolean |
isdirsep(byte c) |
private static boolean |
isDoubleStarAndSlash(byte[] bytes,
int pos) |
private static boolean |
isRoot(byte[] base) |
private static boolean |
isSpecialFile(java.lang.String name) |
private static java.lang.String |
newStringFromUTF8(byte[] bytes,
int offset,
int len) |
private static java.lang.String |
newStringFromUTF8(org.jruby.util.ByteList bytes) |
private static int |
nextSlashIndex(byte[] bytes,
int start,
int end) |
private static int |
push_braces(jnr.posix.POSIX posix,
java.lang.String cwd,
java.util.List<org.jruby.util.ByteList> result,
Dir.GlobPattern pattern) |
static java.util.List<org.jruby.util.ByteList> |
push_glob(jnr.posix.POSIX posix,
java.lang.String cwd,
org.jruby.util.ByteList globByteList,
int flags) |
private static int |
push_globs(jnr.posix.POSIX posix,
java.lang.String cwd,
java.util.List<org.jruby.util.ByteList> ary,
org.jruby.util.ByteList pattern,
int flags) |
static int |
range(byte[] _pat,
int pat,
int pend,
char test,
int flags) |
private static int |
rb_path_next(byte[] _s,
int s,
int send) |
private static int |
remove_backslashes(byte[] bytes,
int index,
int end) |
public static final boolean DOSISH
public static final boolean CASEFOLD_FILESYSTEM
public static final int FNM_NOESCAPE
public static final int FNM_PATHNAME
public static final int FNM_DOTMATCH
public static final int FNM_CASEFOLD
public static final int FNM_SYSCASE
public static final int FNM_NOMATCH
public static final int FNM_ERROR
public static final byte[] EMPTY
public static final byte[] SLASH
public static final byte[] STAR
public static final byte[] DOUBLE_STAR
static final Dir.GlobFunc<java.util.List<org.jruby.util.ByteList>> push_pattern
private static final Dir.GlobFunc<Dir.GlobArgs> glob_caller
private static boolean isdirsep(byte c)
private static int rb_path_next(byte[] _s,
int s,
int send)
private static int fnmatch_helper(byte[] bytes,
int pstart,
int pend,
byte[] string,
int sstart,
int send,
int flags)
public static int fnmatch(byte[] bytes,
int pstart,
int pend,
byte[] string,
int sstart,
int send,
int flags)
private static boolean isDoubleStarAndSlash(byte[] bytes,
int pos)
private static int nextSlashIndex(byte[] bytes,
int start,
int end)
public static int range(byte[] _pat,
int pat,
int pend,
char test,
int flags)
public static java.util.List<org.jruby.util.ByteList> push_glob(jnr.posix.POSIX posix,
java.lang.String cwd,
org.jruby.util.ByteList globByteList,
int flags)
private static int push_braces(jnr.posix.POSIX posix,
java.lang.String cwd,
java.util.List<org.jruby.util.ByteList> result,
Dir.GlobPattern pattern)
private static int push_globs(jnr.posix.POSIX posix,
java.lang.String cwd,
java.util.List<org.jruby.util.ByteList> ary,
org.jruby.util.ByteList pattern,
int flags)
private static boolean has_magic(byte[] bytes,
int begin,
int end,
int flags)
private static int remove_backslashes(byte[] bytes,
int index,
int end)
private static int indexOf(byte[] bytes,
int begin,
int end,
byte ch)
private static byte[] extract_path(byte[] bytes,
int begin,
int end)
private static byte[] extract_elem(byte[] bytes,
int begin,
int end)
private static boolean beginsWithDriveLetter(byte[] path,
int begin,
int end)
private static boolean isRoot(byte[] base)
private static boolean isAbsolutePath(byte[] path,
int begin,
int length)
private static java.lang.String[] files(FileResource directory)
private static boolean isSpecialFile(java.lang.String name)
private static int addToResultIfExists(jnr.posix.POSIX posix,
java.lang.String cwd,
byte[] bytes,
int begin,
int end,
int flags,
Dir.GlobFunc<Dir.GlobArgs> func,
Dir.GlobArgs arg)
private static int glob_helper(jnr.posix.POSIX posix,
java.lang.String cwd,
org.jruby.util.ByteList path,
int sub,
int flags,
Dir.GlobFunc<Dir.GlobArgs> func,
Dir.GlobArgs arg)
private static int glob_helper(jnr.posix.POSIX posix,
java.lang.String cwd,
byte[] path,
int begin,
int end,
int sub,
int flags,
Dir.GlobFunc<Dir.GlobArgs> func,
Dir.GlobArgs arg)
private static byte[] getBytesInUTF8(java.lang.String str)
private static java.lang.String newStringFromUTF8(org.jruby.util.ByteList bytes)
private static java.lang.String newStringFromUTF8(byte[] bytes,
int offset,
int len)