Added verbose for split - prints created file name

This commit is contained in:
Michal Piekarz 2015-01-04 17:47:57 +01:00
parent 93c3f02600
commit 61c2086310
2 changed files with 4 additions and 2 deletions

View file

@ -3,8 +3,7 @@
## Missing Features
### Flags
* `-C N`
* `--verbose`
* `--verbose` - created file printing is implemented, don't know if there is anything else
## Possible Optimizations
* Use slice (`[u8]`) directly as the `control.current_line`.

View file

@ -296,6 +296,9 @@ fn split(settings: &Settings) -> int {
fileno += 1;
writer = io::BufferedWriter::new(box io::File::open_mode(&Path::new(filename.as_slice()), io::Open, io::Write) as Box<Writer>);
control.request_new_file = false;
if settings.verbose {
println!("creating file '{}'", filename);
}
}
let consumed = splitter.consume(&mut control);