sanitize_file_path: Sanitize file path input

View source: R/security.R

sanitize_file_pathR Documentation

Sanitize file path input

Description

Validates and sanitizes file paths to prevent directory traversal attacks and ensure safe file operations.

Usage

sanitize_file_path(file_path, allow_relative = FALSE)

Arguments

file_path

Character string representing a file path

allow_relative

Logical. Allow relative paths. Default: FALSE.

Value

Sanitized file path or throws error if invalid

See Also

Other security: is_api_key_configured(), sanitize_domain(), sanitize_hash(), sanitize_ip(), sanitize_url(), security-utilities


virustotal documentation built on April 13, 2026, 9:07 a.m.