Recursively read a directory and return an array of all file paths
90
{
"context": "This evaluation assesses how effectively the engineer uses fs-readdir-recursive's directory path-based filtering capability, specifically leveraging the filter function's 'dir' parameter to exclude directories based on their paths. The focus is on correct usage of the filter function signature and proper directory path comparison.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses fs-readdir-recursive",
"description": "Correctly imports and calls the fs-readdir-recursive function (commonly imported as 'read') to perform recursive directory traversal.",
"max_score": 15
},
{
"name": "Filter function implementation",
"description": "Implements a custom filter function that accepts the three parameters: name, index, and dir. The function must be passed as the second argument to the read() call.",
"max_score": 20
},
{
"name": "Directory path filtering",
"description": "Uses the 'dir' parameter within the filter function to compare against the full directory path for exclusion logic, enabling directory-level filtering as described in the spec.",
"max_score": 30
},
{
"name": "Handles hidden files",
"description": "Properly filters out hidden files/directories (starting with '.') either by checking name[0] !== '.' or by relying on the default filter behavior.",
"max_score": 15
},
{
"name": "Excludes specified directories",
"description": "Correctly implements logic to exclude all files within directories specified in the excludeDirs array, checking if the directory path contains or matches the excluded directory names.",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-fs-readdir-recursive