# is_safe_file_path

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/unicode_security/is_safe_file_path)

Reject deceptive controls and line separators without rewriting file paths.

## Signature

```python
is_safe_file_path(
    path: str,
) -> bool
```

## Returns

`bool`

Whether the path can be displayed and inserted verbatim safely.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/efa9f5364b83e9367ea57d9c21b15b4d81fdcb7a/libs/code/deepagents_code/unicode_security.py#L223)