mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -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!`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user