def list_files()

in FSxL-Compression/fsx_lustre_migrate_files.py [0:0]


def list_files(root_path, manifest_output):
    logger.info("Starting recursive tree walk at path: %s", root_path)
    logger.info("Writing Lustre file paths to manifest file at: %s", manifest_output)
    manifest_fd = open(manifest_output, 'w')
    try:
        for root, dirs, files in os.walk(root_path):
            for filename in files:
                manifest_fd.write(os.path.join(root, filename) + "\n")
    finally:
        manifest_fd.close()