...
| Code Block |
|---|
def count=0, MAXSIZE=100
new File("groovyfoo.battxt").withReader { reader ->
while (reader.readLine() != null) {
if (++count > MAXSIZE) throw new RuntimeException('File too large')
}
}
|
...
...
| Code Block |
|---|
def count=0, MAXSIZE=100
new File("groovyfoo.battxt").withReader { reader ->
while (reader.readLine() != null) {
if (++count > MAXSIZE) throw new RuntimeException('File too large')
}
}
|
...