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

Function delete_pattern

scripts/python_ui/streamlit.py:479–492  ·  view source on GitHub ↗

Delete an existing pattern.

(pattern_name)

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected