Beispiel #1
0
def file_manager_mock(s3_client_mock, js_tree_builder):
    return FileManager(s3_client_mock, js_tree_builder)
Beispiel #2
0
def test_create_from_config():
    file_manager = FileManager.create_from_environ()
Beispiel #3
0
def file_manager(s3_client, js_tree_builder):
    return FileManager(s3_client, js_tree_builder)
Beispiel #4
0
 def configure(binder):
     binder.bind(
         FileManager,
         to=FileManager.create_from_environ(),
         scope=flask_injector.request
     )
Beispiel #5
0
def node_delete(file_manager: FileManager):
    data = request.get_json()
    file_manager.delete_node(data['path'])
    return Response()
Beispiel #6
0
def node_rename(file_manager: FileManager):
    data = request.get_json()
    file_manager.rename_node(data['old_path'], data['new_path'])
    return Response()
Beispiel #7
0
def tree(file_manager: FileManager):
    tree = file_manager.get_tree()
    return jsonify(tree)