24 lines
No EOL
550 B
JavaScript
24 lines
No EOL
550 B
JavaScript
define([], function() {
|
|
|
|
function fileExists(path) {
|
|
|
|
if (!globalThis.NativeAppHost.supports('filesystem')) {
|
|
return Promise.reject();
|
|
}
|
|
|
|
return globalThis.NativeFeature.fileExists(path);
|
|
}
|
|
|
|
function directoryExists(path) {
|
|
if (!globalThis.NativeAppHost.supports('filesystem')) {
|
|
return Promise.reject();
|
|
}
|
|
|
|
return globalThis.NativeFeature.directoryExists(path);
|
|
}
|
|
|
|
return {
|
|
fileExists: fileExists,
|
|
directoryExists: directoryExists
|
|
};
|
|
}); |