From bff6ea6ce0142bd2544aabf185cde47416eb6a4f Mon Sep 17 00:00:00 2001 From: Dayoung Lee Date: Thu, 3 Nov 2022 17:25:59 +0900 Subject: [PATCH] [OneStorage] Rename function This commit renames _initCfgList to _getCfgList. because it doesn't keep the cfglist and just use and dispose it. ONE-vscode-DCO-1.0-Signed-off-by: Dayoung Lee --- src/OneExplorer/OneStorage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OneExplorer/OneStorage.ts b/src/OneExplorer/OneStorage.ts index b1c5d4c9..c1dc1d16 100644 --- a/src/OneExplorer/OneStorage.ts +++ b/src/OneExplorer/OneStorage.ts @@ -73,7 +73,7 @@ export class OneStorage { * @param root the file or directory, * which MUST exist in the file system */ - private _initCfgList(roots: string[] = obtainWorkspaceRoots()): string[] { + private _getCfgList(roots: string[] = obtainWorkspaceRoots()): string[] { /** * Returns an array of all the file names inside the root directory * @todo Check soft link @@ -96,7 +96,7 @@ export class OneStorage { return roots.map(root => readdirSyncRecursive(root).filter(val => val.endsWith('.cfg'))) .reduce((prev, cur) => [...prev, ...cur]); } catch { - Logger.error('OneExplorer', '_initCfgList', 'called on not existing directory or file.'); + Logger.error('OneExplorer', '_getCfgList()', 'called on not existing directory or file.'); return []; } } @@ -148,7 +148,7 @@ export class OneStorage { } private constructor() { - const cfgList = this._initCfgList(); + const cfgList = this._getCfgList(); this._cfgToCfgObjMap = this._initCfgToCfgObjMap(cfgList); this._baseModelToCfgsMap = this._initBaseModelToCfgsMap(cfgList, this._cfgToCfgObjMap); }