INNER CODE UNIT · Python
remove_files
dummylabs/thewatchman · custom_components/watchman/__init__.py:363
def remove_files() -> None:
Path(db_path).unlink(missing_ok=True)
Path(journal_path).unlink(missing_ok=True)
Path(lock_path).unlink(missing_ok=True)
Path(stats_path).unlink(missing_ok=True)
# Cleanup legacy
Path(legacy_db_path).unlink(missing_ok=True)
Path(legacy_wal_path).unlink(missing_ok=True)
Path(legacy_shm_path).unlink(missing_ok=True)
await hass.async_add_executor_job(remove_files)
_LOGGER.info("Watchman database file removed: %s", db_path)
_LOGGER.info("Watchman journal file removed: %s", journal_path)
_LOGGER.info("Watchman stats file removed: %s", stats_path)