Я использую пример кода из документов, и выполняется только первый экземпляр записи. После этого функция завершается без ошибок.
Полученный файл содержит текст: «образец текста»
Есть идеи?
function gotFileWriter(writer) {
writer.onwrite = function(evt) {
console.log("write success");
};
writer.write("some sample text");
// contents of file now 'some sample text'
writer.truncate(11);
// contents of file now 'some sample'
writer.seek(4);
// contents of file still 'some sample' but file pointer is after the 'e' in 'some'
writer.write(" different text");
// contents of file now 'some different text'
}