Avatar
omochimetaru 9/22/2017 4:13 AM
// FIXME: We only support macOS right now.
4:13 AM
FIXMEだ
4:14 AM
/// Helper method to recurse and print the tree. private func recurse(fs: FileSystem, path: AbsolutePath, prefix: String = "") throws { let contents = try fs.getDirectoryContents(path) for (idx, entry) in contents.enumerated() { let isLast = idx == contents.count - 1 let line = prefix + (isLast ? "└── " : "├── ") + entry print(line) let entryPath = path.appending(component: entry) if fs.isDirectory(entryPath) { let childPrefix = prefix + (isLast ? " " : "│ ") try recurse(fs: fs, path: entryPath, prefix: String(childPrefix)) } } }
4:14 AM
楽しそうなのある