Java – how do I get file types on Mac OS X?
•
Java
I use this code to get the type of file –
FileSystemView filesystem = FileSystemView.getFileSystemView(); String sFileType = filesystem.getSystemTypeDescription(file))
Under windows, this code works as a file and displays the type correction of the file However, under Mac OS X, it does not display anything related to this code The method getsystemtypedescription says:
How do I do this? How do I get file types on Mac OS X?
Solution
Look at the quaquaqua library. There is a class osxlionfilesystemview, which is an overlay version of the default filesystemview. It should work normally on OS X lion
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码