chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-23 15:16:17 -07:00
parent 1e6fccf272
commit 47aa03a950
20 changed files with 103 additions and 119 deletions

View File

@@ -1,7 +1,5 @@
// imported for definition purposes only
import * as platformModule from '../platform';
import { FileSystemAccess } from './file-system-access';
import { isIOS } from '../platform';
import { profile } from '../profiling';
// The FileSystemAccess implementation, used through all the APIs.
@@ -14,13 +12,6 @@ function getFileAccess(): FileSystemAccess {
return fileAccess;
}
let platform: typeof platformModule;
function ensurePlatform() {
if (!platform) {
platform = require('../platform');
}
}
function createFile(info: { path: string; name: string; extension: string }) {
const file = new File();
file._path = info.path;
@@ -583,9 +574,8 @@ export module knownFolders {
export module ios {
function _checkPlatform(knownFolderName: string) {
ensurePlatform();
if (!platform.isIOS) {
throw new Error(`The "${knownFolderName}" known folder is available on iOS only!`);
if (!isIOS) {
console.log(`The "${knownFolderName}" known folder is available on iOS only!`);
}
}