Ignore hidden files and folders #3

オープン
Ghostが2020-01-10 18:33:58 +00:00に作成 · 1件のコメント

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:
オーナー

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.
サインインしてこの会話に参加。
ラベルなし
マイルストーンなし
担当者なし
2 人の参加者
通知
期日
期日が正しくないか範囲を超えています。 'yyyy-mm-dd' の形式で入力してください。

期日は未設定です。

依存関係

依存関係が設定されていません。

リファレンス: coolaj86/fs-walk.js#3
説明はありません。