This SO answer shows how to copy a directory recursively and expand all the symlinks from the command line using bash. I cannot find the same functionality in Swift. Does such a function exist? How do I do this concisely in Swift? I could call this bash command from Swift, but would prefer a pure Swift solution.
FileManager.copyItem
copies the symbolic links without resolving them.
This SO answer shows how to resolve a single symlink. However, I would prefer not to traverse the directory manually, checking if each item is symlink that needs to be resolved.