我有以下代码:
chrome.runtime.getPackageDirectoryEntry(function(directoryEntry)
{
directoryEntry.getFile("files/test.txt", {create: true, exclusive: false}, function(fileEntry)
{
console.log(fileEntry);
},
function(error)
{
console.log(error);
});
});
如果文件不存在且create为true,则会出现It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.
错误。但如果确实存在并且create为false,则可以访问该文件。
我做错了什么?