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

Function folderContents

src/astroprint/api/files.py:306–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304@api.route("/files/folder-contents", methods=["GET"])
305@restricted_access
306def folderContents():
307 location = request.args.get('location')
308 externalDriveMgr = externalDriveManager()
309
310 if location == '/':
311 return jsonify(externalDriveMgr.getRemovableDrives())
312
313 else:
314 return jsonify(externalDriveMgr.getFolderContents("%s/*" % location))
315
316@api.route("/files/file-browsing-extensions", methods=["GET"])
317@restricted_access

Callers

nothing calls this directly

Calls 4

externalDriveManagerFunction · 0.90
getMethod · 0.45
getRemovableDrivesMethod · 0.45
getFolderContentsMethod · 0.45

Tested by

no test coverage detected