View Source Scanner (fnord v0.4.32)

The Scanner module traverses a directory recursively, skipping hidden files and files that should be ignored based on a .gitignore file. It also skips binary files and files with a size of 0 bytes.

Summary

Functions

Count the number of files in the directory, excluding hidden, ignored, binary, and empty files.

Create a new Scanner struct.

Recursively scan the directory and accumulate a result using the provided accumulator and function.

Recursively scan the directory and call the callback function for each file.

Functions

count_files(scanner)

Count the number of files in the directory, excluding hidden, ignored, binary, and empty files.

new(root, callback)

Create a new Scanner struct.

reduce(scanner, acc, dir \\ nil, fun)

Recursively scan the directory and accumulate a result using the provided accumulator and function.

scan(scanner, dir \\ nil)

Recursively scan the directory and call the callback function for each file.