fix file.create: don't create an .empty folder on devices with new API support
feat docs: add Frequently Asked Questions section
This commit is contained in:
@ -30057,7 +30057,9 @@ var createDirectory = _asyncToGenerator(function* () {
|
||||
var parent = yield root();
|
||||
|
||||
return parent.createDirectory.apply(parent, args).then(function () {
|
||||
return createFile(args[0] + '/.empty');
|
||||
if (window.needsShim) {
|
||||
return createFile(args[0] + '/.empty');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -21,8 +21,11 @@ function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPr
|
||||
};
|
||||
}(Element.prototype));
|
||||
|
||||
window.needsShim = false;
|
||||
|
||||
function shimDirectory(directory) {
|
||||
if (!directory.getFilesAndDirectories) {
|
||||
window.needsShim = true;
|
||||
directory.toString = function() { return '[object Directory]' };
|
||||
directory.getFilesAndDirectories = function getFilesAndDirectories() {
|
||||
var current = (this.path || '') + this.name;
|
||||
|
Reference in New Issue
Block a user