-1

I have to read a file from the file system of my phone. Essentially its to check if the file contains a word. The file is located in the /sys folder of my phone. I know I can get the contents of the File using FileReader.readAsText(file) to get the contents as a string and then parse it for the word. But how do I make the "file" object to pass to the FileReader object. Thanks in advance!

Edit: Just wanted to add here:

Can I use the File constructor here?

var file = File("/path/to/file");

4

1 回答 1

1

您只能从您的应用程序文件夹(通过 XMLHttpRequest)和 SD 卡中读取数据。您无法从 Firefox OS 应用程序中的任何其他位置读取数据。

于 2014-09-09T23:23:28.083 回答