IEnumerable<string> ReadFilePaths(string filePath) { /* 再起なしでファイルパスをすべて読み取る */ }

IEnumerable<string> ReadFilePathsRecursive(string filePath) =>
ReadFilePaths(filePath)
.SelectMany(i => ReadFilePathsRecursive(i))
.Append(filePath)
;


はい