Produces a set of all unique file extensions found in a directory This is a convenience function that combines getDirectoryStructure and convertDirectoryNodeToTypeSet
Absolute path to the directory to analyze
Optional
Optional directory traversal options
Set of file extensions (including the dot, e.g., '.ts', '.js') Files without extensions are represented as 'none'
const fileTypes = produceFileTypeSet('/path/to/project');console.log(fileTypes); // Set { '.ts', '.js', '.json', '.md', 'none' } Copy
const fileTypes = produceFileTypeSet('/path/to/project');console.log(fileTypes); // Set { '.ts', '.js', '.json', '.md', 'none' }
// With optionsconst fileTypes = produceFileTypeSet('/path/to/project', { includeHidden: false, maxDepth: 5}); Copy
// With optionsconst fileTypes = produceFileTypeSet('/path/to/project', { includeHidden: false, maxDepth: 5});
Produces a set of all unique file extensions found in a directory This is a convenience function that combines getDirectoryStructure and convertDirectoryNodeToTypeSet