-1
public Track createNewTrack(File file) throws IOException {
Path path = file.toPath();
String trackName = (String) Files.getAttribute(path, "Title"); //get name of track from file
String artist = (String) Files.getAttribute(path, "Authors"); //get artist from file
String filePath = file.getPath(); //get file path from file
Track track = new Track(trackName, artist, filePath);
return track;
}
由於某種原因,它沒有找到該屬性...任何人都可以幫助我,爲什麼這可能是?如何獲取MP3文件'標題'和'作者'的屬性