// Create an absolute path if we were handed a relative one.
path = resolveToFullPath_(this.fullPath, path);
idb_.get(path, function(fileEntry) {
if (options.create === true && options.exclusive === true && fileEntry) {
// If create and exclusive are both true, and the path already exists,
// getFile must fail.
For example (http://www.w3.org/TR/file-system-api/ ):
fs.root.getFile("already_there.txt", null, function (f) { getAsText(f.file()); });
The second parameter to getFile is allowed to be null. In the implementation of getFile, it doesn't check for this and it will throw:
DirectoryEntry.prototype.getFile = function(path, options, successCallback, opt_errorCallback) {
// Create an absolute path if we were handed a relative one. path = resolveToFullPath_(this.fullPath, path);
idb_.get(path, function(fileEntry) { if (options.create === true && options.exclusive === true && fileEntry) { // If create and exclusive are both true, and the path already exists, // getFile must fail.