Fwd: Files.walk() is unusable because of AccessDeniedException
Gilles Habran
gilleshabran at gmail.com
Tue May 24 08:36:54 UTC 2016
Good morning,
well I would like to be able to manage the outcome of the processing myself
and not get an exception in a part where I have no control.
For example, I would expect to get an exception when I tried to read a file
where I don't have the permission. I would not expect to get an exception
when Java creates the Stream<Path>.
Maybe I am the only one to have a problem with this ? I don't know but it
feels strange to be forced to execute a software with root permissions
where I don't even plan to read file I cannot read because of lack of
permissions.
For me, we should be able to test the attributes of a file and depending on
the result, read the file or not. If we read the file without permission,
we get an exception, if not, we can go to the next file without error.
If that's unclear, please let me know, I'll try to give more informations
or examples.
Thank you.
On 24 May 2016 at 10:19, Andrew Haley <aph at redhat.com> wrote:
> On 05/20/2016 10:38 AM, Gilles Habran wrote:
> > why is my message still waiting for approval after a month ?
>
> What is it you want Java to do? You can't walk the directory
> because you don't have permission. sudo should work.
>
> Andrew.
>
>
More information about the core-libs-dev
mailing list