code: function(location, contents, args) {
  			var that = this;
  			return this._getEntry(location).then(function(entry){
  				return entry;
  			}, function() {
  				var lastSlash = location.lastIndexOf("/");
  				var parentLocation = (lastSlash === -1) ? this._rootLocation : location.substring(0, lastSlash + 1);
  				var name = decodeURIComponent(location.substring(lastSlash +1));
  				return that.createFile(parentLocation, name).then(function() {
  					return that._getEntry(location);
  				});
  			}).then(function(entry) {
  				var d = new orion.Deferred();
  				entry.createWriter(function(writer) {
  					var blob = new Blob([contents]);
  					writer.write(blob);
  					var truncated = false;
  					writer.onwrite = function() {
  						if (!truncated) {
  							truncated = true;
  							writer.truncate(blob.size);
  						} else {
  							createFile(entry).then(d.resolve, d.reject);
  						}
  					};
  					writer.onerror = function() {
  						d.reject(writer.error);
  					};
  				});
  				return d;
  			});
  		}
docs: Writes the contents or metadata of the file at the given location.
  
  @param {String} location The location of the file to set contents for
  @param {String|Object} contents The content string, or metadata object to write
  @param {String|Object} args Additional arguments used during write operation (i.e. ETag)
  @return A deferred for chaining events after the write completes with new metadata object