Skip to content

config_file_exists

sryu1 edited this page Jan 3, 2023 · 1 revision

config_file_exists function

Check whether a configuration file exists.

Parameters

  • config_file (str): The file to check for existence.

Returns

  • bool: True if the file exists, False if it does not.

Example

exists = config_file_exists("settings.json")
if exists:
    print("Settings file found")
else:
    print("Settings file not found")

Clone this wiki locally