EmbyCrackedClient/web/native/interop/filesystem.js

24 lines
550 B
JavaScript
Raw Permalink Normal View History

2025-06-25 11:46:04 +08:00
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
};
});