MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / clear

Method clear

packages/core/file-system/index.ts:727–740  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

725 }
726
727 public clear(): Promise<any> {
728 return new Promise((resolve, reject) => {
729 let hasError = false;
730 const onError = function (error) {
731 hasError = true;
732 reject(error);
733 };
734
735 this.clearSync(onError);
736 if (!hasError) {
737 resolve(true);
738 }
739 });
740 }
741
742 public clearSync(onError?: (error: any) => void): void {
743 getFileAccess().emptyFolder(this.path, onError);

Callers

nothing calls this directly

Calls 2

clearSyncMethod · 0.95
resolveFunction · 0.50

Tested by

no test coverage detected