0
var filepath="path of a file";
var txtFile = new File(filepath);
var filepath="path of a file";
var txtFile = new File(filepath);
錯誤顯示「需要2個參數」。所以你需要兩個參數。
嘗試
var txtFile = new File([""], filepath);
https://gist.github.com/Arahnoid/9925725從GitHub鏈接 – SameerKhan1406