例子: var file = new File('/sdcard/my.txt'); file.write('hello'); console.log('read ret:' + file.read());
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
fullPath | string | 必填 | 文件全路径,比如:/sdcard/test.txt |
参数名 | 类型 | 必填 | 说明 |
---|
参数名 | 类型 | 必填 | 说明 |
---|
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
charset | string | 选填 | 字符集,默认为utf-8 |
参数名 | 类型 | 必填 | 说明 |
---|
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
content | string | 必填 | 写到文件中的数据 |
charset | string | 选填 | 字符集,默认为utf-8 |
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
content | string | 必填 | 追加到文件中的数据 |
charset | string | 选填 | 字符集,默认为utf-8 |