Skip to content
Snippets Groups Projects
Commit b5cf7d61 authored by Swen Vermeul's avatar Swen Vermeul
Browse files

removed FileListHandler, as files should be obtained by the api

parent 30322e9d
No related branches found
No related tags found
No related merge requests found
......@@ -249,33 +249,3 @@ class DataSetUploadHandler(IPythonHandler):
self.upload_data(conn=conn,data=data)
class FileListHandler(IPythonHandler):
def get(self, **params):
"""
Returns the file list of the current directory (relative to the CWD)
:param params:
:return: dictionary of files, key is the fully qualified name,
value is the relative name (for display)
"""
path = ""
if 'path' in params:
path = params['path']
look_in_path = os.path.join(os.getcwd(), path)
files = {}
for file in os.scandir(look_in_path):
files[file.path] = {
"name": file.name,
"is_dir": file.is_dir(),
"size": file.stat().st_size
}
self.set_status(200)
self.write({
"files": files
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment