MCPcopy Index your code
hub / github.com/diffgram/diffgram / __get_folder_contents

Method __get_folder_contents

shared/connection/s3_connector.py:403–418  ·  view source on GitHub ↗
(self, opts)

Source from the content-addressed store, hash-verified

401 @with_connection
402 @with_s3_exception_handler
403 def __get_folder_contents(self, opts):
404 spec_list = [{'bucket_name': str, 'path': str}]
405 log = regular_log.default()
406 log, input = regular_input.input_check_many(untrusted_input = opts,
407 spec_list = spec_list,
408 log = log)
409 if len(log["error"].keys()) >= 1:
410 return {'log': log}
411 prefix = opts['path']
412 just_folders = opts.get('just_folders', False)
413 files = []
414 if not just_folders:
415 files = sorted(self.__list_s3_files(opts))
416 folders = sorted(list(self.__list_s3_directories(opts)))
417 result = folders + files
418 return {'result': result}
419
420 @with_connection
421 @with_s3_exception_handler

Callers 1

fetch_dataMethod · 0.95

Calls 3

__list_s3_filesMethod · 0.95
__list_s3_directoriesMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected