MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / delete_pattern

Function delete_pattern

scripts/python_ui/streamlit.py:478–491  ·  view source on GitHub ↗

Delete an existing pattern.

(pattern_name)

Source from the content-addressed store, hash-verified

476
477
478def delete_pattern(pattern_name):
479 """Delete an existing pattern."""
480 try:
481 if not pattern_name:
482 return False, "Pattern name cannot be empty."
483
484 pattern_path = os.path.join(pattern_dir, pattern_name)
485 if not os.path.exists(pattern_path):
486 return False, "Pattern does not exist."
487
488 shutil.rmtree(pattern_path)
489 return True, f"Pattern '{pattern_name}' deleted successfully."
490 except Exception as e:
491 return False, f"Error deleting pattern: {str(e)}"
492
493
494def pattern_creation_wizard():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected