MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / exists

Method exists

PySimpleGUI/PySimpleGUI.py:22754–22766  ·  view source on GitHub ↗

Check if a particular settings file exists. Returns True if file exists :param filename: The name of the file to use. Can be a full path and filename or just filename :type filename: (str or None) :param path: The folder that the settings file will be stored i

(self, filename=None, path=None)

Source from the content-addressed store, hash-verified

22752 return self.dict
22753
22754 def exists(self, filename=None, path=None):
22755 """
22756 Check if a particular settings file exists. Returns True if file exists
22757
22758 :param filename: The name of the file to use. Can be a full path and filename or just filename
22759 :type filename: (str or None)
22760 :param path: The folder that the settings file will be stored in. Do not include the filename.
22761 :type path: (str or None)
22762 """
22763 cfull_filename, cpath, cfilename = self._compute_filename(filename=filename, path=path)
22764 if os.path.exists(cfull_filename):
22765 return True
22766 return False
22767
22768 def delete_entry(self, key, section=None, silent_on_error=None):
22769 """

Callers 6

check_imports_in_fileFunction · 0.80
saveMethod · 0.80
readMethod · 0.80
execute_py_fileFunction · 0.80

Calls 1

_compute_filenameMethod · 0.95

Tested by

no test coverage detected