MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / network_remove_bashrc_export_block

Function network_remove_bashrc_export_block

Scripts/Settings.py:7298–7303  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

7296 return
7297 if route == '/api/fs/read':
7298 path = safe_realpath(payload.get('path'), must_exist=True)
7299 if os.path.isdir(path):
7300 raise IsADirectoryError('Cannot read a directory.')
7301 if not is_text_file(path):
7302 raise ValueError('Only text files can be opened in the editor.')
7303 send_json(self, 200, {'ok': True, 'path': path, 'content': read_text_file(path)})
7304 return
7305 if route == '/api/fs/write':
7306 path = safe_realpath(payload.get('path'), must_exist=True)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected