MCPcopy Create free account
hub / github.com/Noumena-Network/code / delete

Function delete

src/utils/secureStorage/plainTextStorage.ts:104–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 }
103 },
104 delete(): boolean {
105 // sync IO: called from sync context (SecureStorage interface)
106 const { storagePath } = getStoragePath()
107 try {
108 getFsImplementation().unlinkSync(storagePath)
109 return true
110 } catch (e: unknown) {
111 const code = getErrnoCode(e)
112 if (code === 'ENOENT') {
113 return true
114 }
115 return false
116 }
117 },
118} satisfies SecureStorage

Callers

nothing calls this directly

Calls 3

getStoragePathFunction · 0.85
getFsImplementationFunction · 0.85
getErrnoCodeFunction · 0.85

Tested by

no test coverage detected