@ReturnNullAsFalse
public static ArrayValue gzfile(Env env,
StringValue fileName,
@Optional boolean useIncludePath)
{
BinaryInput is = (BinaryInput) gzopen(env, fileName, "r", useIncludePath);
if (is == null)
return null;
try {
ArrayValue result = new ArrayValueImpl();
StringValue line;
while ((line = is.readLine(Integer.MAX_VALUE)) != null &&
line.length() > 0)
result.put(line);
return result;
} catch (IOException e) {
throw new QuercusModuleException(e);
} finally {
is.close();
}
}