MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / searchStorageInfo

Function searchStorageInfo

src/controller/storage/allList.ts:80–100  ·  view source on GitHub ↗
(v: string | undefined, displayType: boolean = false)

Source from the content-addressed store, hash-verified

78
79//根据标识返回StorageListAll
80function searchStorageInfo(v: string | undefined, displayType: boolean = false): StorageInfoType {
81 for (const storageItem of storageInfoList) {
82 if (!displayType) {
83 if (
84 (storageItem.description === v || storageItem.label === v || storageItem.type === v) &&
85 !storageItem.displayType
86 ) {
87 return storageItem
88 }
89 } else {
90 if (
91 storageItem.description === v ||
92 storageItem.label === v ||
93 storageItem.displayType === v
94 ) {
95 return storageItem
96 }
97 }
98 }
99 return storageInfoList[0]!
100}
101
102export { searchStorageInfo, updateStorageInfoList, storageInfoList }

Callers 5

AddMount_pageFunction · 0.90
AddStorage_pageFunction · 0.90
editModeFunction · 0.90
Storage_pageFunction · 0.90
createStorageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected