I have following Objective-C code:
NSFileWrapper* fileWrapper;
NSMutableDictionary* wrappers = [NSMutableDictionary dictionary];
...
fileWrapper = [[NSFileWrapper alloc]
initDirectoryWithFileWrappers:wrappers];
I tried to convert above code to Swift:
var fileWrapper : NSFileWrapper?
let wrappers = NSMutableDictionary(dictionary: [:])
....
fileWrapper = NSFileWrapper(directoryWithFileWrappers: wrappers)
the last line cannot be compiled. I got error message saying
Cannot convert value type of 'NSMutableDictionary' to expected argument type '[String : NSFileWrapper]'
I am not sure what is type of [String : NSFileWrapper]
, a list? Is there anyway to convert wrappers to this type?