1
0
Derivar 0

Ignore hidden files and folders #3

aberta(s)
2020-01-10 18:33:58 +00:00 aberta(s) por Ghost · 1 comentário

Hello! thanks for this plugin, it is really excellent and it is one of the few that truly respects the performance once executed.

I wanted to know more about the possibility of being able to avoid "walking" over hidden files and folders (ex: .dotfilerc).

Currently there seems to be no option to avoid this. There is the filters option but it seems that you cannot insert regex or something dynamic in order to avoid inspection on this type of files and folders.
Now I managed to get around the problem by adding a package (multimatch) and with a few lines of code I can prevent the walker from adding the hidden files to me:

  • root.indexOf ('.') === -1 &&! filestats.name.startsWith ('.')) in a .zip archive.

Since I should add some paths, as previously said, to a .zip archive, now the addition of hidden files and folders is correctly avoided ... but the walker still crosses the path with the hidden files and/or folders anyway, and this obviously increases the final wait for the final resolution of all the paths ... in case I add multiple large-scale files on the zip archive: ex. currently I go through all the .git folders (which have a lot of files inside) of each project, and I certainly wait a few seconds more than the filters option ... so I ask you it is possible to extend the plugin with a new option: maybe: (followHidden: Boolean) so that the final traversing speed of the files would be faster? Or if you know alternatives that allow me to recover speed performance in traversing files without adding other plugins, it would be very nice.

Thank you! 👍

Hello! thanks for this plugin, it is really excellent and it is one of the few that truly respects the **performance** once executed. I wanted to know more about the possibility of being able to avoid "walking" over hidden files and folders (ex: `.dotfilerc`). Currently there seems to be **no option** to avoid this. There is the `filters` option but it seems that you cannot insert regex or something dynamic in order to avoid inspection on this type of files and folders. Now I managed to get around the problem by adding a package ([_multimatch_](https://github.com/sindresorhus/multimatch)) and with a few lines of code I can prevent the `walker` from adding the hidden files to me: - `root.indexOf ('.') === -1 &&! filestats.name.startsWith ('.')`) in a `.zip` archive. Since I should add some paths, as previously said, to a `.zip` archive, now the addition of hidden files and folders is correctly avoided ... but the` walker` still crosses the path with the hidden files and/or folders anyway, and this obviously increases the final wait for the final resolution of all the paths ... in case I add multiple large-scale files on the zip archive: ex. currently I go through all the `.git` folders (which have a lot of files inside) of each project, and I certainly wait a few seconds more than the` filters` option ... so I ask you it is possible to extend the plugin with a new option: maybe: (`followHidden: Boolean`) so that the final traversing speed of the files would be faster? Or if you know alternatives that allow me to recover speed performance in traversing files without adding other plugins, it would be very nice. Thank you! :+1:
Proprietário(a)

So sorry I never saw this.

I'd actually recommend using https://www.npmjs.com/package/@root/walk instead, which is far more performant and has much simpler options.

So sorry I never saw this. I'd actually recommend using https://www.npmjs.com/package/@root/walk instead, which is far more performant and has much simpler options.
Inicie a sessão para participar neste diálogo.
Sem rótulo
Sem etapa
Sem encarregados
2 Participantes
Notificações
Data de vencimento
A data de vencimento é inválida ou está fora do intervalo permitido. Por favor, use o formato 'aaaa-mm-dd'.

Sem data de vencimento definida.

Dependências

Não estão definidas dependências.

Referência: coolaj86/fs-walk.js#3
Nenhuma descrição fornecida.