Normalize an iterable of file paths against a root directory.
Each path is resolved to a clean unix-style relative path under rootPath
via toRelativePath. The result is sorted lexicographically and
deduplicated. Files that resolve outside rootPath are silently dropped.
The returned array is allocated once at the input length and trimmed at the
end — no intermediate allocations or array resizes occur.
Parameters
rootPath: string
Already-resolved absolute root directory.
files: Iterable<string>
File paths to normalize (absolute or relative to rootPath).
Returns string[]
Sorted, deduplicated array of clean unix relative paths.
Normalize an iterable of file paths against a root directory.
Each path is resolved to a clean unix-style relative path under
rootPathvia toRelativePath. The result is sorted lexicographically and deduplicated. Files that resolve outsiderootPathare silently dropped.The returned array is allocated once at the input length and trimmed at the end — no intermediate allocations or array resizes occur.