[io] NIO2 and non-default file system support

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[io] NIO2 and non-default file system support

Chesney, Mark
Hello,

Awhile back I ran into a situation where I needed to read the lines of a file that might be on a non-default file system, like an in-memory file system, on Java 7+. I looked to the commons-io ReversedLinesFileReader, but it only works with java.io.File files which are always on the default file system only. I duplicated the class in my project and found it was relatively straightforward to adapt it to support both java.io.File and java.nio.file.Path file. Commons-io 2.6 seems to be the first version to require Java 7 which introduced NIO2. I think others would appreciate the NIO2 constructors, saving a call to Path#toFile(), even if they're not using non-default file systems. I previously created a JIRA issue IO-578<https://issues.apache.org/jira/browse/IO-578> and an GitHub pull request #62<https://github.com/apache/commons-io/pull/62>. I feel the PR is of very high quality, short and to the point, ready or nearly ready to merge. I would appreciate any feedback I can get on the JIRA issue or GitHub PR. I'm hopeful this could make commons-io 2.7. Thanks for your attention and consideration.



Regards,

Mark
Reply | Threaded
Open this post in threaded view
|

Re: [io] NIO2 and non-default file system support

Matt Sicker
I’ve been interested in seeing IO be updated to include support for using
Path instead of just File. I can review your PR this week, though I’m
certainly not the only one who can.

On Tue, May 14, 2019 at 13:19, Chesney, Mark <[hidden email]>
wrote:

> Hello,
>
> Awhile back I ran into a situation where I needed to read the lines of a
> file that might be on a non-default file system, like an in-memory file
> system, on Java 7+. I looked to the commons-io ReversedLinesFileReader, but
> it only works with java.io.File files which are always on the default file
> system only. I duplicated the class in my project and found it was
> relatively straightforward to adapt it to support both java.io.File and
> java.nio.file.Path file. Commons-io 2.6 seems to be the first version to
> require Java 7 which introduced NIO2. I think others would appreciate the
> NIO2 constructors, saving a call to Path#toFile(), even if they're not
> using non-default file systems. I previously created a JIRA issue IO-578<
> https://issues.apache.org/jira/browse/IO-578> and an GitHub pull request
> #62<https://github.com/apache/commons-io/pull/62>. I feel the PR is of
> very high quality, short and to the point, ready or nearly ready to merge.
> I would appreciate any feedback I can get on the JIRA issue or GitHub PR.
> I'm hopeful this could make commons-io 2.7. Thanks for your attention and
> consideration.
>
>
>
> Regards,
>
> Mark
>
--
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: [io] NIO2 and non-default file system support

garydgregory
The one patch has been merged.

Gary

On Thu, May 16, 2019, 02:03 Matt Sicker <[hidden email]> wrote:

> I’ve been interested in seeing IO be updated to include support for using
> Path instead of just File. I can review your PR this week, though I’m
> certainly not the only one who can.
>
> On Tue, May 14, 2019 at 13:19, Chesney, Mark <[hidden email]>
> wrote:
>
> > Hello,
> >
> > Awhile back I ran into a situation where I needed to read the lines of a
> > file that might be on a non-default file system, like an in-memory file
> > system, on Java 7+. I looked to the commons-io ReversedLinesFileReader,
> but
> > it only works with java.io.File files which are always on the default
> file
> > system only. I duplicated the class in my project and found it was
> > relatively straightforward to adapt it to support both java.io.File and
> > java.nio.file.Path file. Commons-io 2.6 seems to be the first version to
> > require Java 7 which introduced NIO2. I think others would appreciate the
> > NIO2 constructors, saving a call to Path#toFile(), even if they're not
> > using non-default file systems. I previously created a JIRA issue IO-578<
> > https://issues.apache.org/jira/browse/IO-578> and an GitHub pull request
> > #62<https://github.com/apache/commons-io/pull/62>. I feel the PR is of
> > very high quality, short and to the point, ready or nearly ready to
> merge.
> > I would appreciate any feedback I can get on the JIRA issue or GitHub PR.
> > I'm hopeful this could make commons-io 2.7. Thanks for your attention and
> > consideration.
> >
> >
> >
> > Regards,
> >
> > Mark
> >
> --
> Matt Sicker <[hidden email]>
>
Reply | Threaded
Open this post in threaded view
|

Re: [io] NIO2 and non-default file system support

Matt Sicker
Thanks, Gary!

On Thu, 16 May 2019 at 05:37, Gary Gregory <[hidden email]> wrote:

>
> The one patch has been merged.
>
> Gary
>
> On Thu, May 16, 2019, 02:03 Matt Sicker <[hidden email]> wrote:
>
> > I’ve been interested in seeing IO be updated to include support for using
> > Path instead of just File. I can review your PR this week, though I’m
> > certainly not the only one who can.
> >
> > On Tue, May 14, 2019 at 13:19, Chesney, Mark <[hidden email]>
> > wrote:
> >
> > > Hello,
> > >
> > > Awhile back I ran into a situation where I needed to read the lines of a
> > > file that might be on a non-default file system, like an in-memory file
> > > system, on Java 7+. I looked to the commons-io ReversedLinesFileReader,
> > but
> > > it only works with java.io.File files which are always on the default
> > file
> > > system only. I duplicated the class in my project and found it was
> > > relatively straightforward to adapt it to support both java.io.File and
> > > java.nio.file.Path file. Commons-io 2.6 seems to be the first version to
> > > require Java 7 which introduced NIO2. I think others would appreciate the
> > > NIO2 constructors, saving a call to Path#toFile(), even if they're not
> > > using non-default file systems. I previously created a JIRA issue IO-578<
> > > https://issues.apache.org/jira/browse/IO-578> and an GitHub pull request
> > > #62<https://github.com/apache/commons-io/pull/62>. I feel the PR is of
> > > very high quality, short and to the point, ready or nearly ready to
> > merge.
> > > I would appreciate any feedback I can get on the JIRA issue or GitHub PR.
> > > I'm hopeful this could make commons-io 2.7. Thanks for your attention and
> > > consideration.
> > >
> > >
> > >
> > > Regards,
> > >
> > > Mark
> > >
> > --
> > Matt Sicker <[hidden email]>
> >



--
Matt Sicker <[hidden email]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [io] NIO2 and non-default file system support

Chesney, Mark
Thank you both. I'd be willing to make some more contributions towards modernization of the API if you have some idea where the greatest need or highest value is. Are there any existing JIRA issues that come to mind?

Regards,
Mark

> -----Original Message-----
> From: Matt Sicker <[hidden email]>
> Sent: Thursday, May 16, 2019 8:22 AM
> To: Commons Developers List <[hidden email]>
> Subject: Re: [io] NIO2 and non-default file system support
>
> Thanks, Gary!
>
> On Thu, 16 May 2019 at 05:37, Gary Gregory <[hidden email]> wrote:
> >
> > The one patch has been merged.
> >
> > Gary
> >
> > On Thu, May 16, 2019, 02:03 Matt Sicker <[hidden email]> wrote:
> >
> > > I’ve been interested in seeing IO be updated to include support for
> > > using Path instead of just File. I can review your PR this week,
> > > though I’m certainly not the only one who can.
> > >
> > > On Tue, May 14, 2019 at 13:19, Chesney, Mark
> > > <[hidden email]>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > Awhile back I ran into a situation where I needed to read the
> > > > lines of a file that might be on a non-default file system, like
> > > > an in-memory file system, on Java 7+. I looked to the commons-io
> > > > ReversedLinesFileReader,
> > > but
> > > > it only works with java.io.File files which are always on the
> > > > default
> > > file
> > > > system only. I duplicated the class in my project and found it was
> > > > relatively straightforward to adapt it to support both
> > > > java.io.File and java.nio.file.Path file. Commons-io 2.6 seems to
> > > > be the first version to require Java 7 which introduced NIO2. I
> > > > think others would appreciate the
> > > > NIO2 constructors, saving a call to Path#toFile(), even if they're
> > > > not using non-default file systems. I previously created a JIRA
> > > > issue IO-578< https://issues.apache.org/jira/browse/IO-578> and an
> > > > GitHub pull request
> > > > #62<https://github.com/apache/commons-io/pull/62>. I feel the PR
> > > > is of very high quality, short and to the point, ready or nearly
> > > > ready to
> > > merge.
> > > > I would appreciate any feedback I can get on the JIRA issue or GitHub PR.
> > > > I'm hopeful this could make commons-io 2.7. Thanks for your
> > > > attention and consideration.
> > > >
> > > >
> > > >
> > > > Regards,
> > > >
> > > > Mark
> > > >
> > > --
> > > Matt Sicker <[hidden email]>
> > >
>
>
>
> --
> Matt Sicker <[hidden email]>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [io] NIO2 and non-default file system support

Matt Sicker
I previously noted my ideas in https://issues.apache.org/jira/browse/IO-595

On Thu, 16 May 2019 at 14:53, Chesney, Mark <[hidden email]> wrote:

>
> Thank you both. I'd be willing to make some more contributions towards modernization of the API if you have some idea where the greatest need or highest value is. Are there any existing JIRA issues that come to mind?
>
> Regards,
> Mark
>
> > -----Original Message-----
> > From: Matt Sicker <[hidden email]>
> > Sent: Thursday, May 16, 2019 8:22 AM
> > To: Commons Developers List <[hidden email]>
> > Subject: Re: [io] NIO2 and non-default file system support
> >
> > Thanks, Gary!
> >
> > On Thu, 16 May 2019 at 05:37, Gary Gregory <[hidden email]> wrote:
> > >
> > > The one patch has been merged.
> > >
> > > Gary
> > >
> > > On Thu, May 16, 2019, 02:03 Matt Sicker <[hidden email]> wrote:
> > >
> > > > I’ve been interested in seeing IO be updated to include support for
> > > > using Path instead of just File. I can review your PR this week,
> > > > though I’m certainly not the only one who can.
> > > >
> > > > On Tue, May 14, 2019 at 13:19, Chesney, Mark
> > > > <[hidden email]>
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > Awhile back I ran into a situation where I needed to read the
> > > > > lines of a file that might be on a non-default file system, like
> > > > > an in-memory file system, on Java 7+. I looked to the commons-io
> > > > > ReversedLinesFileReader,
> > > > but
> > > > > it only works with java.io.File files which are always on the
> > > > > default
> > > > file
> > > > > system only. I duplicated the class in my project and found it was
> > > > > relatively straightforward to adapt it to support both
> > > > > java.io.File and java.nio.file.Path file. Commons-io 2.6 seems to
> > > > > be the first version to require Java 7 which introduced NIO2. I
> > > > > think others would appreciate the
> > > > > NIO2 constructors, saving a call to Path#toFile(), even if they're
> > > > > not using non-default file systems. I previously created a JIRA
> > > > > issue IO-578< https://issues.apache.org/jira/browse/IO-578> and an
> > > > > GitHub pull request
> > > > > #62<https://github.com/apache/commons-io/pull/62>. I feel the PR
> > > > > is of very high quality, short and to the point, ready or nearly
> > > > > ready to
> > > > merge.
> > > > > I would appreciate any feedback I can get on the JIRA issue or GitHub PR.
> > > > > I'm hopeful this could make commons-io 2.7. Thanks for your
> > > > > attention and consideration.
> > > > >
> > > > >
> > > > >
> > > > > Regards,
> > > > >
> > > > > Mark
> > > > >
> > > > --
> > > > Matt Sicker <[hidden email]>
> > > >
> >
> >
> >
> > --
> > Matt Sicker <[hidden email]>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>


--
Matt Sicker <[hidden email]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [io] NIO2 and non-default file system support

garydgregory
In reply to this post by Chesney, Mark
Hi Mark,

Mining JIRA or GitHub PRs is always a good idea. Aside from that, I'd say
just work on something that interests you.

Gary

On Thu, May 16, 2019 at 3:53 PM Chesney, Mark <[hidden email]>
wrote:

> Thank you both. I'd be willing to make some more contributions towards
> modernization of the API if you have some idea where the greatest need or
> highest value is. Are there any existing JIRA issues that come to mind?
>
> Regards,
> Mark
>
> > -----Original Message-----
> > From: Matt Sicker <[hidden email]>
> > Sent: Thursday, May 16, 2019 8:22 AM
> > To: Commons Developers List <[hidden email]>
> > Subject: Re: [io] NIO2 and non-default file system support
> >
> > Thanks, Gary!
> >
> > On Thu, 16 May 2019 at 05:37, Gary Gregory <[hidden email]>
> wrote:
> > >
> > > The one patch has been merged.
> > >
> > > Gary
> > >
> > > On Thu, May 16, 2019, 02:03 Matt Sicker <[hidden email]> wrote:
> > >
> > > > I’ve been interested in seeing IO be updated to include support for
> > > > using Path instead of just File. I can review your PR this week,
> > > > though I’m certainly not the only one who can.
> > > >
> > > > On Tue, May 14, 2019 at 13:19, Chesney, Mark
> > > > <[hidden email]>
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > Awhile back I ran into a situation where I needed to read the
> > > > > lines of a file that might be on a non-default file system, like
> > > > > an in-memory file system, on Java 7+. I looked to the commons-io
> > > > > ReversedLinesFileReader,
> > > > but
> > > > > it only works with java.io.File files which are always on the
> > > > > default
> > > > file
> > > > > system only. I duplicated the class in my project and found it was
> > > > > relatively straightforward to adapt it to support both
> > > > > java.io.File and java.nio.file.Path file. Commons-io 2.6 seems to
> > > > > be the first version to require Java 7 which introduced NIO2. I
> > > > > think others would appreciate the
> > > > > NIO2 constructors, saving a call to Path#toFile(), even if they're
> > > > > not using non-default file systems. I previously created a JIRA
> > > > > issue IO-578< https://issues.apache.org/jira/browse/IO-578> and an
> > > > > GitHub pull request
> > > > > #62<https://github.com/apache/commons-io/pull/62>. I feel the PR
> > > > > is of very high quality, short and to the point, ready or nearly
> > > > > ready to
> > > > merge.
> > > > > I would appreciate any feedback I can get on the JIRA issue or
> GitHub PR.
> > > > > I'm hopeful this could make commons-io 2.7. Thanks for your
> > > > > attention and consideration.
> > > > >
> > > > >
> > > > >
> > > > > Regards,
> > > > >
> > > > > Mark
> > > > >
> > > > --
> > > > Matt Sicker <[hidden email]>
> > > >
> >
> >
> >
> > --
> > Matt Sicker <[hidden email]>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
>