class_docstr: Driver for fetching credentials that are saved locally on the filesystem.
class_docstr_tok: ["Driver","for","fetching","credentials","that","are","saved","locally","on","the","filesystem","."]
docstr: Returns a temporary directory on the filesystem to store encrypted credentials.
  
  Will automatically create the new directory if it does not exist.
  
  Returns:
      str: local path for streamalert_secrets tmp directory
docstr_tok: ["Returns","a","temporary","directory","on","the","filesystem","to","store","encrypted","credentials",".","Will","automatically","create","the","new","directory","if","it","does","not","exist",".","Returns",":","str",":","local","path","for","streamalert_secrets","tmp","directory"]
code: def get_local_credentials_temp_dir():
      """Returns a temporary directory on the filesystem to store encrypted credentials.
  
      Will automatically create the new directory if it does not exist.
  
      Returns:
          str: local path for streamalert_secrets tmp directory
      """
      temp_dir = os.path.join(
          tempfile.gettempdir(), "streamalert_secrets"
      )
  
      # Check if this item exists as a file, and remove it if it does
      if os.path.isfile(temp_dir):
          os.remove(temp_dir)
  
      # Create the folder on disk to store the credentials temporarily
      if not os.path.exists(temp_dir):
          os.makedirs(temp_dir)
  
      return temp_dir
  
imports: import json
  import os
  import shutil
  import tempfile
  from abc import abstractmethod
  from botocore.exceptions import ClientError
  from streamalert.shared.helpers.aws_api_client import AwsKms, AwsSsm
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 8 for calling the LocalFileDriver obj's underlying member method code with example usage: obj.get_local_credentials_temp_dir() and returns: temp_dir