()
| 26 | } |
| 27 | |
| 28 | async function getStorageSize() |
| 29 | { |
| 30 | // Cache size |
| 31 | let cacheSize = await fileManager.dirSize(cache.folder); |
| 32 | |
| 33 | cacheSize = cacheSize / 1000 / 1000; |
| 34 | |
| 35 | if(cacheSize > 1000) |
| 36 | cacheSize = app.round(cacheSize / 1000, 1)+'GB'; |
| 37 | else |
| 38 | cacheSize = app.round(cacheSize, 1)+'MB'; |
| 39 | |
| 40 | dom.queryAll('.cacheSize').html(' ('+cacheSize+')'); |
| 41 | |
| 42 | // Temp size |
| 43 | let tmpSize = await fileManager.dirSize(tempFolder); |
| 44 | |
| 45 | tmpSize = tmpSize / 1000 / 1000; |
| 46 | |
| 47 | if(tmpSize > 1000) |
| 48 | tmpSize = app.round(tmpSize / 1000, 1)+'GB'; |
| 49 | else |
| 50 | tmpSize = app.round(tmpSize, 1)+'MB'; |
| 51 | |
| 52 | dom.queryAll('.temporaryFilesSize').html(' ('+tmpSize+')'); |
| 53 | } |
| 54 | |
| 55 | async function clearCache() |
| 56 | { |
no outgoing calls
no test coverage detected