0
是否可以將FileEntry
轉換爲標準JavaScript對象File
? 我無法找到任何有意義的文檔https://developer.chrome.com/apps/fileSystem如何使用Chrome應用程序將FileEntry轉換爲標準JavaScript文件對象fileSystem
是否可以將FileEntry
轉換爲標準JavaScript對象File
? 我無法找到任何有意義的文檔https://developer.chrome.com/apps/fileSystem如何使用Chrome應用程序將FileEntry轉換爲標準JavaScript文件對象fileSystem
我發現如何做到這一點在谷歌的例子https://github.com/GoogleChrome/chrome-app-samples/blob/master/samples/filesystem-access/js/app.js
var jsFileObject;
fileEntry.file(function (file){
jsFileObject = file
});
不要忘記錯誤回調!在一些(儘管)罕見的情況下,你將永遠不會回調。簽名應該是'entry.file(成功,錯誤)' – kzahel