2018/9/11 4:50:49 -0700, [email protected]:
>> On 11 Sep 2018, at 10:24, Alan Bateman <[email protected]> wrote:
>> On 10/09/2018 21:55, Roger Riggs wrote:
>>> Nope! there's quoting on Windows that gets short changed with that work 
>>> around.
>>> 
>>> Other opinions?, Suggestions?
>> 
>> One suggestion is reduce this down to one method that returns a
>> stream rather than a collection. It could work lazily if you
>> want. Something like:
>> 
>>  Stream<String> splitSearchPath(String input)
> 
> I agree with Alan, this seems like the lowest-order primitive.

Agreed, but it begs a question that applies to all these alternatives:
Why does this API belong in java.nio.file.Paths?

In other words, search paths are a different abstraction from filesystem
paths.  Should they have their own class, even if it only winds up with
a couple of static utility methods?  java.nio.file.SearchPath?

    public class SearchPath {
        public static Stream<String> splitToStream(String searchPath);
        public static List<Path> splitToPaths(String searchPath);
        public static String join(Collection<String>);
    }

- Mark

Reply via email to