Skip to content

[CLOSED] Basic file writing API support #21

@core-ai-bot

Description

@core-ai-bot

Issue by jasonsanjose
Friday Dec 16, 2011 at 07:49 GMT
Originally opened as adobe/brackets#17


Minimum API for overwriting existing files:

// overwrite 'log.txt' with new content
directoryEntry.getFile('log.txt', {create: false}, function(fileEntry) {

// Create a FileWriter object for our FileEntry (log.txt).
fileEntry.createWriter(function(fileWriter) {

  fileWriter.onwriteend = function(e) {
    console.log('Write completed.');
  };

  fileWriter.onerror = function(e) {
    console.log('Write failed: ' + e.toString());
  };

  fileWriter.write("this should be a Blob, using strings for now");

}, errorHandler);

}, errorHandler);

@njx Still buggy. _FileWriter.write() is called with this === window. Need some debugging help tomorrow morning.


jasonsanjose included the following code: https://github.com/adobe/brackets/pull/17/commits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions