adishegde / media_hub

Decentralized file sharing over LAN
https://adishegde.github.io/media_hub/
MIT License
25 stars 2 forks source link

Add config option to ignore files #6

Closed adishegde closed 6 years ago

adishegde commented 6 years ago

A config option to match file names when indexing, so that matched files will be ignored, will be helpful for not sharing hidden files and directories. The ignored files will not be indexed nor served.

The config option could be an array of regex strings. If a file name matches with any of the regex expressions it should be ignored.

adishegde commented 6 years ago

This functionality has been added in commit 7c9e64f. One caveat is that if the directory shared (that is explicitly mentioned via the share option) matches the ignored patterns then none of its children is indexed or served however the shared directory itself can be obtained in the searches (with 0 as the size and no children in the listing).