--- a/src/eric7/MicroPython/MicroPythonFileManager.py Mon Mar 06 09:50:18 2023 +0100 +++ b/src/eric7/MicroPython/MicroPythonFileManager.py Mon Mar 06 11:39:26 2023 +0100 @@ -81,6 +81,21 @@ self.__device = device + def exists(self, pathname): + """ + Public method to check the existence of a file or directory. + + @param pathname name of the path to check + @type str + @return flag indicating the existence + @rtype bool + """ + try: + return self.__device.exists(pathname) + except Exception as exc: + self.error.emit("exists", str(exc)) + return False + @pyqtSlot(str) def lls(self, dirname, showHidden=False): """