MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / deviceStorage

Method deviceStorage

src/astroprint/plugin/services/system.py:509–523  ·  view source on GitHub ↗
(self,data,sendResponse)

Source from the content-addressed store, hash-verified

507 sendMessage("error_restoring_factory_settings",True)
508
509 def deviceStorage(self,data,sendResponse):
510 pm = platformManager()
511
512 driveTotal, driveUsed, driveFree = pm.driveStats()
513 s = settings()
514 clearFiles = s.getBoolean(['clearFiles'])
515
516 sendResponse({
517 "sizeLogs" : pm.logsSize(),
518 "sizeUploads" : pm.uploadsSize(),
519 "driveTotal" : driveTotal,
520 "driveUsed" : driveUsed,
521 "driveFree" : driveFree,
522 "clearFiles" : clearFiles
523 })
524
525 def clearLogStorage(self, data, sendResponse):
526 if softwareManager.clearLogs():

Callers

nothing calls this directly

Calls 6

platformManagerFunction · 0.90
settingsFunction · 0.90
driveStatsMethod · 0.80
getBooleanMethod · 0.80
logsSizeMethod · 0.80
uploadsSizeMethod · 0.80

Tested by

no test coverage detected