Re: Adding Path-based constructors to various classes

2018-12-18 Thread Kasper Nielsen
Hi, I don't know if it makes sense at this time. But if File and Path had both implemented CharSequence. We could just accept a CharSequence for every method that needs a path/file. Allowing to parse along either a File, Path or String. I've have done myself in some APIs that uses tree-based stru

Re: Adding Path-based constructors to various classes

2018-12-18 Thread Jonathan Gibbons
ok.com>>; nio-dev mailto:nio-...@openjdk.java.net>> Cc: Core-Libs-Dev mailto:core-libs-dev@openjdk.java.net>> Subject: Re: Adding Path-based constructors to various classes (looping in nio-dev) Hi Andrew, The NIO APIs (Java 1.4) were intended to supplement the pre-existing Java

Re: Adding Path-based constructors to various classes

2018-12-17 Thread Brian Burkhalter
ailto:nio-...@openjdk.java.net>> > Cc: Core-Libs-Dev <mailto:core-libs-dev@openjdk.java.net>> > Subject: Re: Adding Path-based constructors to various classes > > (looping in nio-dev) > > Hi Andrew, > > The NIO APIs (Java 1.4) were intended to supplement th

RE: Adding Path-based constructors to various classes

2018-12-17 Thread Andrew Luo
e any NIO.2 APIs that supersede RandomAccessFile either, but I could be wrong. Thanks, -Andrew From: Brian Burkhalter Sent: Monday, December 17, 2018 4:47 PM To: Andrew Luo ; nio-dev Cc: Core-Libs-Dev Subject: Re: Adding Path-based constructors to various classes (looping in nio-dev) Hi A

Re: Adding Path-based constructors to various classes

2018-12-17 Thread Brian Burkhalter
(looping in nio-dev) Hi Andrew, The NIO APIs (Java 1.4) were intended to supplement the pre-existing Java I/O APIs and this effort was continued in the NIO.2 APIs (Java 7). The Path interface is part of the latter. My impression is that the intent was more to supersede the older APIs than to e

Adding Path-based constructors to various classes

2018-12-17 Thread Andrew Luo
Many classes such as: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/RandomAccessFile.html https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/zip/ZipFile.html have constructors that use the File API or String but no constructor that takes Path. Is there