handbook/references/internal-api/wp-cli-utils-normalize-path.md
Pascal Birchler 264cb131bf
Fix handbook information architecture
- Organize files in folders according to the desired structure
- Use directory iterator to loop through all files and folders (makes generation more robust)
2025-06-25 15:38:39 +02:00

1.7 KiB

WP_CLI\Utils\normalize_path()

Normalize a filesystem path.


Usage

WP_CLI\Utils\normalize_path( $path )
$path (string) Path to normalize.
@return (string) path.

Notes

On Windows systems, replaces backslashes with forward slashes and forces upper-case drive letters. Allows for two leading slashes for Windows network shares, but ensures that all other duplicate slashes are reduced to a single one. Ensures upper-case drive letters on Windows systems.

Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.