Print per-file in index

pull/221/head
Varun Patil 2022-11-07 12:46:43 -08:00
parent 0104c3ea07
commit 0576b28f5c
1 changed files with 9 additions and 8 deletions

View File

@ -277,14 +277,6 @@ class Index extends Command
return; return;
} }
// Clear previous line and write new one
$line = 'Scanning folder '.$folderPath;
if ($this->previousLineLength) {
$this->output->write("\r".str_repeat(' ', $this->previousLineLength)."\r");
}
$this->output->write($line."\r");
$this->previousLineLength = \strlen($line);
$nodes = $folder->getDirectoryListing(); $nodes = $folder->getDirectoryListing();
foreach ($nodes as &$node) { foreach ($nodes as &$node) {
@ -305,6 +297,15 @@ class Index extends Command
private function parseFile(File &$file, bool &$refresh): void private function parseFile(File &$file, bool &$refresh): void
{ {
// Clear previous line and write new one
$line = 'Scanning file '.$file->getPath();
if ($this->previousLineLength) {
$this->output->write("\r".str_repeat(' ', $this->previousLineLength)."\r");
}
$this->output->write($line."\r");
$this->previousLineLength = \strlen($line);
// Process the file
$res = $this->timelineWrite->processFile($file, $refresh); $res = $this->timelineWrite->processFile($file, $refresh);
if (2 === $res) { if (2 === $res) {
++$this->nProcessed; ++$this->nProcessed;