class_docstr: json commands.
docstr: Iterate over ``root_folder`` and set each JSON file to a value
  under ``json_path`` with the file name as the key.
  
  ``nx`` if set to True, set ``value`` only if it does not exist.
  ``xx`` if set to True, set ``value`` only if it exists.
  ``decode_keys`` If set to True, the keys of ``obj`` will be decoded
  with utf-8.
docstr_tok: ["Iterate","over","``","root_folder","``","and","set","each","JSON","file","to","a","value","under","``","json_path","``","with","the","file","name","as","the","key",".","``","nx","``","if","set","to","True",",","set","``","value","``","only","if","it","does","not","exist",".","``","xx","``","if","set","to","True",",","set","``","value","``","only","if","it","exists",".","``","decode_keys","``","If","set","to","True",",","the","keys","of","``","obj","``","will","be","decoded","with","utf-8","."]
code: def set_path(
      self,
      json_path: str,
      root_folder: str,
      nx: Optional[bool] = False,
      xx: Optional[bool] = False,
      decode_keys: Optional[bool] = False,
  ) -> List[Dict[str, bool]]:
      """
      Iterate over ``root_folder`` and set each JSON file to a value
      under ``json_path`` with the file name as the key.
  
      ``nx`` if set to True, set ``value`` only if it does not exist.
      ``xx`` if set to True, set ``value`` only if it exists.
      ``decode_keys`` If set to True, the keys of ``obj`` will be decoded
      with utf-8.
  
      """
      set_files_result = {}
      for root, dirs, files in os.walk(root_folder):
          for file in files:
              file_path = os.path.join(root, file)
              try:
                  file_name = file_path.rsplit(".")[0]
                  self.set_file(
                      file_name,
                      json_path,
                      file_path,
                      nx=nx,
                      xx=xx,
                      decode_keys=decode_keys,
                  )
                  set_files_result[file_path] = True
              except JSONDecodeError:
                  set_files_result[file_path] = False
  
      return set_files_result
  
imports: import os
  from json import JSONDecodeError, loads
  from typing import Dict, List, Optional, Tuple, Union
  from redis.exceptions import DataError
  from redis.utils import deprecated_function
  from ._util import JsonType
  from .decoders import decode_dict_keys
  from .path import Path
label_desc: Use image node_id 21 for calling the JSONCommands obj's underlying member method code with example usage: obj.set_path(json_path, root_folder, nx, xx, decode_keys) and returns: set_files_result