I know that FolderItem.MacType is deprecated. But why?
There is a modern replacement available which works well (even on macOS 10.13):
Soft Declare Function NSHFSTypeOfFile Lib "Foundation"(path As CFStringRef) As CFStringRef
Dim cocoTYPE As CFStringRef = NSHFSTypeOfFile(pXPVFile.NativePath)
Sometimes there is a need for an old TYPE instead of an Uniform Type Identifier.
Also FolderItem.MacCreator is not deprecated. This seems to be an error to act differently for TYPE and CREATOR
Of course does Apple no longer use TYPE and CREATOR. But they are still part of the Finder-Info of a file (at least on HFS) and I need to access it from time to time.
Since I like to compile with no warning I replaced the FolderItem.MacType with the “NSHFSTypeOfFile” call. But I wonder if it is really necessary.
BTW: Is there another way to silence a deprecated warning?
[quote]I know that FolderItem.MacType is deprecated. But why?
There is a modern replacement available which works well (even on macOS 10.13):[/quote]
They have been replaced with Universal Type Identifiers.
Note that your suggested replacement method NSHFSTypeOfFile contains HFS, it may not be functional on a system with APFS.