This question:
How to read Finder icons (left source list) on OS X using Swift
received an awesome answer in Objective-C by @ken-thomases.
When I wanted to use it in Swift I realized it wasn't a trivial translation so I posted my Swift version as an answer, with attribution to Ken's answer.
Is it ok to do what I did?
I've got Ken's approval so I'm ok with this answer, but I'm still not sure if this is ok in general.
Before asking this question here I've read this one:
Is it acceptable to copy old Objective-C answers just to rewrite them in Swift?
and a few 'similar' other ones, but I felt like they didn't really answer this specific situation where the translation needed some work.