filterfs is a FUSE-based filesystem that allows creating a filtered view of a filesystem.
In order to install it I did the following on macOS 10.12:
1. Installed FUSE for macOS version 3.10.2 and restarted
3. brew install automake
4. autoreconf -i
5. ./configure && make && sudo make install
In order to test it:
1. mkdir test
2. filterfs /path/to/somedir /path/to/test --include=*.py -o debug
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.19
flags=0xf8000008
max_readahead=0x00100000
INIT: 7.8
flags=0x00000000
max_readahead=0x00100000
max_write=0x02000000
unique: 2, error: 0 (Undefined error: 0), outsize: 40
unique: 2, opcode: STATFS (17), nodeid: 1, insize: 40
unique: 2, error: 0 (Undefined error: 0), outsize: 96
and many more errors. I guess that filterfs needs some modifications in order to be used on macOS. I hope that the experts here can provide some guidance.