220 26353 <87y45zcxob.fsf@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Moritz Klammler <moritz.klammler@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: File globbing in the standard library
Date: Tue, 21 Jun 2016 00:17:40 +0200
Lines: 90
Approved: news@gmane.org
Message-ID: <87y45zcxob.fsf@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1466461077 22570 80.91.229.3 (20 Jun 2016 22:17:57 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 20 Jun 2016 22:17:57 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDHI7IWJYALRBCGXUG5QKGQEQFTAQUI@isocpp.org Tue Jun 21 00:17:49 2016
Return-path: <std-proposals+bncBDHI7IWJYALRBCGXUG5QKGQEQFTAQUI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f197.google.com ([209.85.217.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDHI7IWJYALRBCGXUG5QKGQEQFTAQUI@isocpp.org>)
	id 1bF7Vp-0007Nj-J2
	for gclcip-std-proposals@m.gmane.org; Tue, 21 Jun 2016 00:17:45 +0200
Original-Received: by mail-lb0-f197.google.com with SMTP id c1sf34778808lbw.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 20 Jun 2016 15:17:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:in-reply-to:message-id:user-agent:mime-version
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=iI56Bb/ZcxAu1ww0B+NTnMogdH4d0/0weDZqPh+TIL0=;
        b=MQF2VB6dRU2i6tJVPKtaXuMdUGtjMJv4xGZCeiWt9dlDunAc54pDQ5FHh1OUaZB9/L
         nSEHsTKN4fx2YhoLuq31gtFmowqcQvY3IpRQfsp2NLRa/1chVD/IG2ZyWrjUP7CpNXFr
         wdlO4GwnHh5tbxOt1YNU66Sj2rxZqMWe88DlPPNFbdnqDVRENTvRsaTmxfxOUAjhiOWl
         L5+rgK23GmLW4n+SGFO3UdgJYKAhb2RD7VUrT1YTASwyrFLdrh+3ZcryFory7lq05ZrP
         WGT9ptJlJPJgCMzRjQqOiL9RWNsqelFH4q3FUsMqe2KTPIzEVOACxoaZvvmGxfVYuQEG
         6W3Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:in-reply-to:message-id
         :user-agent:mime-version:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=iI56Bb/ZcxAu1ww0B+NTnMogdH4d0/0weDZqPh+TIL0=;
        b=Q29kfgzEq6T5fR0LAkSwhL7AglRFH6kcTu5z5S2vzdqlO6mWIj37zQIPeNLLFfehkZ
         QNpWDXgqvNtNXwSadLR8KejeGdkhM84QdfnOauq/UYOBup8pfjxpDZaORofuI/fFrJuK
         CswXUx3sG+Z/TQ1w7Dq7MTzz7N0sCXHsSQ/hDBvciIP1HCF2H+TaLdd/lY7KYUiJQyKm
         Kt1ciqCJutPoIMYl055BdwM1aj2G00SlwNfmUgWpJgx1RVucu7QKYxO4xLsz9InhX4j0
         NeOKZy4zBe1P01FShHST2N4dR2hQM5SX3TEaJZhQhc7nQ3N9AH3HgcJ3va8fJJTZxZH5
         Ock 
X-Gm-Message-State: ALyK8tK2e+EHtI2b7vzbES+ZRqvFluuvvP1c1m39rhDj+IDL4osmgQKV62E0MSPkg+pf1A==
X-Received: by 10.28.197.2 with SMTP id v2mr31560wmf.1.1466461064982;
        Mon, 20 Jun 2016 15:17:44 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.46.0.96 with SMTP id 93ls190587lja.87.gmail; Mon, 20 Jun 2016
 15:17:43 -0700 (PDT)
X-Received: by 10.25.43.213 with SMTP id r204mr5201916lfr.112.1466461063569;
        Mon, 20 Jun 2016 15:17:43 -0700 (PDT)
Original-Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com. [2a00:1450:4010:c04::230])
        by mx.google.com with ESMTPS id uh6si24406881lbc.47.2016.06.20.15.17.43
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 20 Jun 2016 15:17:43 -0700 (PDT)
Received-SPF: pass (google.com: domain of moritz.klammler@gmail.com designates 2a00:1450:4010:c04::230 as permitted sender) client-ip=2a00:1450:4010:c04::230;
Original-Received: by mail-lb0-x230.google.com with SMTP id ak10so2101160lbc.3
        for <std-proposals@isocpp.org>; Mon, 20 Jun 2016 15:17:43 -0700 (PDT)
X-Received: by 10.194.116.195 with SMTP id jy3mr18712387wjb.36.1466461063168;
        Mon, 20 Jun 2016 15:17:43 -0700 (PDT)
Original-Received: from moritz-desktop (openvpn-cl-200-117.scc.kit.edu. [141.3.200.117])
        by smtp.gmail.com with ESMTPSA id b77sm4050364wme.0.2016.06.20.15.17.41
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 20 Jun 2016 15:17:41 -0700 (PDT)
In-Reply-To: Sean Middleditch's message of "Mon\, 20 Jun 2016 14\:46\:28 -0700
	\(PDT\) \(26 minutes\, 8 seconds ago\)"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
X-Original-Sender: moritz.klammler@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 moritz.klammler@gmail.com designates 2a00:1450:4010:c04::230 as permitted
 sender) smtp.mailfrom=moritz.klammler@gmail.com;       dmarc=pass (p=NONE
 dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:26353
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26353>

Sean Middleditch <sean.middleditch@gmail.com> writes:

> Could/should this be resolved the same way we handle regex, e.g.=20
> glob_constants::POSIX, glob_constants::DOS, glob_constants::NATIVE, etc.?

I think that this is a good way to handle this.  It allows the
application -- and therefore eventually the user -- to decide what their
idea of "portable behavior" is.  It is also open to potential future
extensions such as a hypothetical ISO globing standard.



> On Wednesday, June 8, 2016 at 5:47:19 AM UTC-7, Tony V E wrote:
>>
>> Do you want cross-platform behaviour or platform-native behaviour?
>>
>> "*.*" is not the same under dos/windows vs unix/mac/linux.=20
>>
>> =E2=80=8ECross platform seems nice, but if a user tpes "*.*" into a cust=
om Open=20
>> File dialog, I might want (as the user probably expects) per-platform=20
>> behaviour.=20
>>
>>
>>
>> Sent from my BlackBerry portable Babbage Device
>> *From: *Morwenn
>> *Sent: *Wednesday, June 8, 2016 4:53 AM
>> *To: *ISO C++ Standard - Future Proposals
>> *Reply To: *std-pr...@isocpp.org <javascript:>
>> *Subject: *[std-proposals] File globbing in the standard library
>>
>> The C++17 standard filesystem library would benefit from a generic file=
=20
>> globbing utility, which is a really common operation when dealing with=
=20
>> files.
>> Here is a brief description of how I would envision it:
>>
>>    - Add a glob dialect to the regular expression libraries (with=20
>>    standard jokers, including **).
>>    - Add a glob function to path (or somewhere else) taking an std::rege=
x.
>>    - Add overloads to glob for std::string, std::string_view, const char=
*=20
>>    that default to the newly introduced glob dialect.
>>
>> I guess that the string types mentioned above would use=20
>> std::filesystem::path::value_type for their value type.
>>
>> I believe that using std::regex allows to have a truly generic globbing=
=20
>> interface, while defaulting to a regular glob dialect provides the=20
>> behaviour people expect by default for a glob function.
>>
>> Any thoughts about such a design?
>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/860ea5e8-d2=
f7-46d1-b1e0-e5493195fa28%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/860ea5e8-d=
2f7-46d1-b1e0-e5493195fa28%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>>

--=20
OpenPGP:

Public Key:   http://openpgp.klammler.eu
Fingerprint:  2732 DA32 C8D0 EEEC A081  BE9D CF6C 5166 F393 A9C0

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/87y45zcxob.fsf%40gmail.com.

.
