remove_directory

View as MarkdownOpen in Claude

Remove a directory from being served. A leading / is added to the route automatically if missing. If the route is not currently mounted, this method does nothing.

Parameters

route
strRequired

URL path to remove (e.g., "/audio").

Returns

None

Example

1from signalwire import WebService
2
3web = WebService(
4 port=8002,
5 directories={"/audio": "./audio_files", "/images": "./public/images"}
6)
7web.remove_directory("/images")
8web.start() # Only /audio is served