byte[] bs = getBytesInUTF8(dirp[i]); if (fnmatch(STAR,0,1,bs,0,bs.length,flags) != 0) { continue; buf.append(base); buf.append(isRoot(base) ? EMPTY : SLASH ); buf.append(getBytesInUTF8(dirp[i])); if (isAbsolutePath(buf.getUnsafeBytes(), buf.getBegin(), buf.getRealSize())) { st = new JavaSecuredFile(newStringFromUTF8(buf.getUnsafeBytes(), buf.getBegin(), buf.getRealSize())); byte[] bs = getBytesInUTF8(dirp[i]); if(fnmatch(magic,0,magic.length,bs,0, bs.length,flags) == 0) { buf.length(0); buf.append(base); buf.append(isRoot(base) ? EMPTY : SLASH ); buf.append(getBytesInUTF8(dirp[i])); if(m == -1) { status = func.call(buf.getUnsafeBytes(),0, buf.getRealSize(),arg); byte[] bs = getBytesInUTF8(basename); byte[] absoluteName = getBytesInUTF8(je.getName()); int len = bs.length; int absoluteLen = absoluteName.length;
final byte[] fileBytes = getBytesInUTF8(file); if (recursive) { if ( fnmatch(STAR, 0, 1, fileBytes, 0, fileBytes.length, flags) != 0) { buf.append(base); buf.append( isRoot(base) ? EMPTY : SLASH ); buf.append( getBytesInUTF8(file) ); resource = JRubyFile.createResource(runtime, cwd, new String(buf.unsafeBytes(), buf.begin(), buf.length(), enc.getCharset())); if ( !resource.isSymLink() && resource.isDirectory() && !".".equals(file) && !"..".equals(file) ) { buf.append(base); buf.append( isRoot(base) ? EMPTY : SLASH ); buf.append( getBytesInUTF8(file) ); if ( SLASH_INDEX == -1 ) { status = func.call(buf.getUnsafeBytes(), 0, buf.getRealSize(), enc, arg);
final byte[] fileBytes = getBytesInUTF8(file); if (recursive) { if ( fnmatch(STAR, 0, 1, fileBytes, 0, fileBytes.length, flags) != 0) { buf.append(base); buf.append( isRoot(base) ? EMPTY : SLASH ); buf.append( getBytesInUTF8(file) ); resource = JRubyFile.createResource(runtime, cwd, new String(buf.unsafeBytes(), buf.begin(), buf.length(), enc.getCharset())); if ( !resource.isSymLink() && resource.isDirectory() && !".".equals(file) && !"..".equals(file) ) { buf.append(base); buf.append( isRoot(base) ? EMPTY : SLASH ); buf.append( getBytesInUTF8(file) ); if ( SLASH_INDEX == -1 ) { status = func.call(buf.getUnsafeBytes(), 0, buf.getRealSize(), enc, arg);
byte[] bs = getBytesInUTF8(dirp[i]); if (fnmatch(STAR,0,1,bs,0,bs.length,flags) != 0) { continue; buf.append(base); buf.append(isRoot(base) ? EMPTY : SLASH ); buf.append(getBytesInUTF8(dirp[i])); st = JRubyFile.createResource(cwd, newStringFromUTF8(buf.getUnsafeBytes(), buf.getBegin(), buf.getRealSize())); if(!st.isSymLink() && st.isDirectory() && !".".equals(dirp[i]) && !"..".equals(dirp[i])) { byte[] bs = getBytesInUTF8(dirp[i]); if(fnmatch(magic,0,magic.length,bs,0, bs.length,flags) == 0) { buf.length(0); buf.append(base); buf.append(isRoot(base) ? EMPTY : SLASH ); buf.append(getBytesInUTF8(dirp[i])); if(m == -1) { status = func.call(buf.getUnsafeBytes(),0, buf.getRealSize(),arg);