You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Václav Haisman <vh...@gmail.com> on 2021/10/23 19:10:41 UTC
Un-deprecating DirectoryScanner?
Hi.
I just updated dependencies and I noticed
org.apache.maven.shared.utils.io.DirectoryScanner is deprecated with
"Deprecated
use java.nio.file.DirectoryStream and related classes" note in sources.
Is this the only reason for the deprecation? I would have to implement
the Ant patterns and regexes around DirectoryStream if I would like to
get on par with DirectoryScanner.
I would rather like to suggest that the class is still very useful, even
though Java now supports directory listing better.
--
VH
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Un-deprecating DirectoryScanner?
Posted by Václav Haisman <vh...@gmail.com>.
On 23. 10. 21 21:30, Michael Osipov wrote:
> Am 2021-10-23 um 21:10 schrieb Václav Haisman:
>> Hi.
>>
>> I just updated dependencies and I noticed
>> org.apache.maven.shared.utils.io.DirectoryScanner is deprecated with
>> "Deprecated
>> use java.nio.file.DirectoryStream and related classes" note in sources.
>>
>> Is this the only reason for the deprecation? I would have to implement
>> the Ant patterns and regexes around DirectoryStream if I would like to
>> get on par with DirectoryScanner.
>>
>> I would rather like to suggest that the class is still very useful, even
>> though Java now supports directory listing better.
>
> I agree here. Had to do similar in another project with the
> DirectoryWalker. The NIO classes are too low level, I prefer DRY. Maybe
> DirectoryScanner and friends can be rewritten to use NIO while
> maintaining a high level API?
I am actually not the first to notice: MSHARED-989
--
VH
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Un-deprecating DirectoryScanner?
Posted by Michael Osipov <mi...@apache.org>.
Am 2021-10-23 um 21:10 schrieb Václav Haisman:
> Hi.
>
> I just updated dependencies and I noticed
> org.apache.maven.shared.utils.io.DirectoryScanner is deprecated with
> "Deprecated
> use java.nio.file.DirectoryStream and related classes" note in sources.
>
> Is this the only reason for the deprecation? I would have to implement
> the Ant patterns and regexes around DirectoryStream if I would like to
> get on par with DirectoryScanner.
>
> I would rather like to suggest that the class is still very useful, even
> though Java now supports directory listing better.
I agree here. Had to do similar in another project with the
DirectoryWalker. The NIO classes are too low level, I prefer DRY. Maybe
DirectoryScanner and friends can be rewritten to use NIO while
maintaining a high level API?
M
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org