Skip to content

Handle Windows Extended-Length Path Prefix (\\?\) #4

Description

@roxblnfk

When creating a Path from a string containing the Windows extended-length prefix \\?\, it should be automatically stripped during normalization.

Example

$path = Path::create('\\?\D:\git\project\src\File.php');

echo (string) $path;
// Expected: 'D:/git/project/src/File.php'

Why this happens

This prefix is returned by external tools (Rust, Go, .NET) that use Windows API for path canonicalization. It allows paths longer than 260 chars but is rarely needed in PHP.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions