2

我可以编写一个文件并附加您的内容,但我不能创建新行。

示例:我需要每行输入一个数字

31/08/2016 00:01,0
31/08/2016 00:02,4
31/08/2016 00:03,0
31/08/2016 00:04,8
31/08/2016 00:05,0
31/08/2016 00:06,0

我尝试使用\nand \r(before and after of line) 返回但不起作用,所有内容都写在一行中。

我正在使用插件 cordova-plugin-file 来写入文件,正是这个函数writeFile

他们,怎么做新线?

4

1 回答 1

0

当我使用它时它对我有用:

writer.write('Some message\n');

于 2021-02-02T09:04:09.630 回答