[英]How to get type of file on Mac OS X?
我正在使用此代码来获取文件类型 -
FileSystemView filesystem = FileSystemView.getFileSystemView();
String sFileType = filesystem.getSystemTypeDescription(file))
在Windows下,此代码工作文件,正确显示文件类型。 但是在Mac OS X下,它没有显示任何代码。 方法getSystemTypeDescription
说:
覆盖具有本机ShellFolder实现的平台。
怎么做以及如何在Mac OS X上获取文件类型?
看看Quaqua库,它有一个类OSXLionFileSystemView ,它是默认FileSystemView的重写版本,应该可以在OS X Lion上正常工作......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.