* Get registered token for uploading recordings * * @return {String|Null}
()
| 280 | * @return {String|Null} |
| 281 | */ |
| 282 | function 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 |
nothing calls this directly
no test coverage detected