MCPcopy Index your code
hub / github.com/LCBOWER33/StegoScan / open_directory

Function open_directory

StegoScan.py:287–296  ·  view source on GitHub ↗

Opens the specified directory in the system's file explorer.

(path)

Source from the content-addressed store, hash-verified

285
286
287def open_directory(path):
288 """Opens the specified directory in the system's file explorer."""
289 if os.path.exists(path):
290 if os.name == 'nt': # Windows
291 subprocess.Popen(f'explorer "{path}"')
292 elif os.name == 'posix': # macOS / Linux
293 subprocess.Popen(['open', path]) # For macOS
294 # subprocess.Popen(['xdg-open', path]) # For Linux
295 else:
296 prRed(f"Directory not found: {path}")
297# Example usage:
298directory_path = "/home/kali/Desktop/riley_output/results_20250501_175944" # Replace with the actual path
299# open_directory(directory_path)

Callers 2

start_progressFunction · 0.85
mainFunction · 0.85

Calls 1

prRedFunction · 0.85

Tested by

no test coverage detected