Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at


This article needs a technical review. How you can help.

This API is available on Firefox OS for privileged or certified applications only.


The getEditable method is used to retrieve a file, which is editable, from a given storage area.

If the request is successful, the request's result is a FileHandle object used to access and update the file on the device.


var instanceOfDOMRequest = instanceOfDeviceStorage.getEditable(fileName);


A string representing the full name (path + file name) of the file to retrieve.


It returns a DOMRequest object to handle the success or error of the operation.


var sdcard = navigator.getDeviceStorage("sdcard");

var request = sdcard.getEditable("myFile.txt");

request.onsuccess = function () {
  var name =;
  console.log('File "' + name + '" successfully retrieved from the sdcard storage area');

request.onerror = function () {
  console.warn('Unable to get the file: ' + this.error);


Not part of any specification.

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, fscholz, kscarfone, Jeremie
 Last updated by: chrisdavidmills,