MCPcopy
hub / github.com/VectifyAI/PageIndex / sanitize_filename

Function sanitize_filename

pageindex/utils.py:266–269  ·  view source on GitHub ↗
(filename, replacement='-')

Source from the content-addressed store, hash-verified

264
265
266def sanitize_filename(filename, replacement='-'):
267 # In Linux, only '/' and '\0' (null) are invalid in filenames.
268 # Null can't be represented in strings, so we only handle '/'.
269 return filename.replace('/', replacement)
270
271def get_pdf_name(pdf_path):
272 # Extract PDF name

Callers 1

get_pdf_nameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected