MCPcopy
hub / github.com/faressoft/terminalizer / getToken

Function getToken

utility.js:282–294  ·  view source on GitHub ↗

* Get registered token for uploading recordings * * @return {String|Null}

()

Source from the content-addressed store, hash-verified

280 * @return {String|Null}
281 */
282function getToken() {
283
284 var globalDirPath = getGlobalDirectory();
285 var tokenPath = di.path.join(globalDirPath, 'token.txt');
286
287 // The file doesn't exist
288 if (!isFile(tokenPath)) {
289 return null;
290 }
291
292 return di.fs.readFileSync(tokenPath, 'utf8');
293
294}
295
296/**
297 * Remove a registered token

Callers

nothing calls this directly

Calls 2

getGlobalDirectoryFunction · 0.85
isFileFunction · 0.85

Tested by

no test coverage detected