Recursively read a directory and return an array of all file paths
90
{
"context": "This criteria evaluates how well the engineer uses the fs-readdir-recursive package to implement a directory inventory tool. The focus is on proper usage of the package's default file filtering capability, which automatically excludes hidden files and directories.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses fs-readdir-recursive",
"description": "The solution imports and uses the fs-readdir-recursive package (typically via require('fs-readdir-recursive')).",
"max_score": 30
},
{
"name": "Leverages default filtering",
"description": "The solution relies on fs-readdir-recursive's built-in default filtering behavior to exclude hidden files, without providing a custom filter function. This demonstrates understanding that the package automatically filters dot files by default.",
"max_score": 40
},
{
"name": "Correct function invocation",
"description": "The solution correctly invokes the fs-readdir-recursive function with just the directory path parameter (e.g., read(dirPath)), demonstrating understanding that the second filter parameter is optional when default filtering is desired.",
"max_score": 20
},
{
"name": "Returns package output",
"description": "The solution directly returns or properly uses the array of file paths returned by fs-readdir-recursive, recognizing that the package already provides paths in the correct format (relative paths as strings).",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-fs-readdir-recursive