Re: Deprecate java.io.File or at least some methods

2018-08-10 Thread Jonathan Gibbons
I'd venture to suggest File is more widely used because it was around from the beginning, whereas Path is significantly more recent. Once you know to look on the Files API, using Path is generally easy and way preferable. -- Jon On 08/10/2018 08:23 AM, Stephen Colebourne wrote: From what I ca

Re: Deprecate java.io.File or at least some methods

2018-08-10 Thread Gary Gregory
On Fri, Aug 10, 2018, 09:25 Stephen Colebourne wrote: > From what I can see, File is more widely used than Path. Thats partly > because using Path is non-obvious - it doesn't have any methods for > doing anything. > > I've suggested before that a default method could be added, so you get > > pat

Re: Deprecate java.io.File or at least some methods

2018-08-10 Thread Stephen Colebourne
>From what I can see, File is more widely used than Path. Thats partly because using Path is non-obvious - it doesn't have any methods for doing anything. I've suggested before that a default method could be added, so you get path.operations().isReadable() path.operations().readAllBytes() path

Deprecate java.io.File or at least some methods

2018-08-06 Thread Remi Forax
Hi all, restarting discussion about JDK-8181098, java.io.File has several severe issues so we should alert users to migrate to use java.nio.file.[Path|Files] ASAP using the deprecation mechanism (obviously not for removal). The usual gotchas - File used string name which may do not map correctly