facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.42k stars 989 forks source link

Question - `hint_num_files_per_dir` recursive or not? #1155

Open liamjones opened 11 months ago

liamjones commented 11 months ago

I'm just looking for some clarity on the documentation for hint_num_files_per_dir.

Should this be set to the largest number of files in a single directory, one level deep, or should it contain the number of files in all the subdirectories under it as well? I've assumed the former for now.

E.g. with this setup:

directory_a/
├─ file_a
├─ file_b
├─ directory_b/
│  ├─ file_c
│  ├─ directory_c/
│  │  ├─ file_d

Is directory_a's num_files_per_dir 2 or 4?