Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98714 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9402 invoked from network); 1 Apr 2017 09:22:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2017 09:22:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.85 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.85 mx104.easyname.com Received: from [77.244.243.85] ([77.244.243.85:45971] helo=mx104.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/60-02743-B417FD85 for ; Sat, 01 Apr 2017 04:22:20 -0500 Received: from cable-81-173-132-37.netcologne.de ([81.173.132.37] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cuFEe-0007Ek-UA; Sat, 01 Apr 2017 09:22:17 +0000 Reply-To: internals@lists.php.net References: To: Rasmus Schultz , Pierre Joye Cc: Kris Craig , Sara Golemon , PHP internals Message-ID: Date: Sat, 1 Apr 2017 11:22:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] Directory separators on Windows From: php@fleshgrinder.com (Fleshgrinder) On 4/1/2017 11:13 AM, Rasmus Schultz wrote: > So to summarize, a normalize_path() function should: > > 1. Fully normalize to an absolute path with no platform-specific separators > 2. Have corrected case (for files/dirs that do exist.) > 3. Have normalized (upper-case) drive-letter on Windows > > There's also network file-system paths on Windows with a different syntax > to consider? I don't know much about that... > 1. cannot be guaranteed by a normalization function, because the parts the dots point to might not exist. Resolving them without knowing if we are dealing with a symbolic or hard link is impossible. UNC paths work the same as normal paths, the only difference is their prefix (e.g. `\\ComputerName\`), in other words, they can be treated like a schemeless URL. Verbatim paths are not supported by PHP anyways, hence, they can be ignored. -- Richard "Fleshgrinder" Fussenegger