Is Path Like • Rust AI Agent SDK

is_path_like: Check if a string looks like a file path. O(1) operation.

is_path_like

Function

</div>

This function is defined in the parse_utils module.

Check if a string looks like a file path. O(1) operation.

Signature

python
def is_path_like(value: &str) -> bool

Parameters

ParamField &str

No description available.

Returns

ResponseField bool

The result of the operation.

Usage

python
use praisonai::parity::parse_utils::is_path_like;

assert!(is_path_like("docs/"));
assert!(is_path_like("./data.pdf"));
assert!(!is_path_like("verbose"));

Uses

  • starts_with
  • ends_with
  • extension
  • contains
  • rsplit
  • next
  • unwrap_or
  • to_lowercase

Source

View on GitHub

praisonai/src/parity/parse_utils.rs at line 60