IO-845 PathUtils.copyDirectory copies or follows symbolic links#827
IO-845 PathUtils.copyDirectory copies or follows symbolic links#827peterdemaeyer wants to merge 7 commits intoapache:masterfrom
Conversation
…ding on the NOFOLLOW_LINKS option
garydgregory
left a comment
There was a problem hiding this comment.
Hello @peterdemaeyer !
I have a comment in the copy visitor, and a small implementation issue about comparing enums.
src/main/java/org/apache/commons/io/file/CopyDirectoryVisitor.java
Outdated
Show resolved
Hide resolved
garydgregory
left a comment
There was a problem hiding this comment.
Hello @peterdemaeyer
Thank you for your update. You'll want to run mvn by itself before you push to run all build checks; this runs the default Maven goal as defined in the POM.
src/main/java/org/apache/commons/io/file/CountingPathVisitor.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/commons/io/file/CountingPathVisitor.java
Outdated
Show resolved
Hide resolved
|
Trying to use headers like |
|
Hi, beware that I’m on vacation this week, only phone access ans no GitHub
access. Don’t expect an update before Sunday. The reason I used <h4> is
because it’s an official/default JavaDoc guideline. I don’t have the
reference here, I’ll reply more in detail when I’m back from vacation.
Anyway, I have no problem changing it, I just wanted to point out that I
didn’t invent it out of thin air.
Op vr 13 feb 2026 om 22:21 schreef Gary Gregory ***@***.***>
… *garydgregory* left a comment (apache/commons-io#827)
<#827 (comment)>
Hi @peterdemaeyer <https://github.com/peterdemaeyer>
Trying to use headers like <h4> in Javadoc is an exercise in frustration.
Different versions seems to have different rules. We do use <h2> without
errors, for example in org.apache.commons.lang3.function.MethodInvokers's
class Javadoc.
—
Reply to this email directly, view it on GitHub
<#827 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK7WUUYP5XKNBPJZQODPT34LY55ZAVCNFSM6AAAAACUEP6SS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQOJZGU2DQMZYHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Enjoy your vacation!
Gary
…On Sat, Feb 14, 2026, 16:27 Peter De Maeyer ***@***.***> wrote:
*peterdemaeyer* left a comment (apache/commons-io#827)
<#827 (comment)>
Hi, beware that I’m on vacation this week, only phone access ans no GitHub
access. Don’t expect an update before Sunday. The reason I used <h4> is
because it’s an official/default JavaDoc guideline. I don’t have the
reference here, I’ll reply more in detail when I’m back from vacation.
Anyway, I have no problem changing it, I just wanted to point out that I
didn’t invent it out of thin air.
Op vr 13 feb 2026 om 22:21 schreef Gary Gregory ***@***.***>
> *garydgregory* left a comment (apache/commons-io#827)
> <#827 (comment)>
>
> Hi @peterdemaeyer <https://github.com/peterdemaeyer>
>
> Trying to use headers like <h4> in Javadoc is an exercise in
frustration.
> Different versions seems to have different rules. We do use <h2> without
> errors, for example in
org.apache.commons.lang3.function.MethodInvokers's
> class Javadoc.
>
> —
> Reply to this email directly, view it on GitHub
> <#827 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAK7WUUYP5XKNBPJZQODPT34LY55ZAVCNFSM6AAAAACUEP6SS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQOJZGU2DQMZYHA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#827 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJB6N3YZVP6RCZAKEMJKAD4L6HM7AVCNFSM6AAAAACUEP6SS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSMBSGU2TEMJTGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Okay, I'll change it, but beware that I didn't randomly pick Your own example of |
Thanks! I noticed you addressed your comment while I was on vacation. Perfect. |
Defined the behavior of
PathUtils.copyDirectoryfor symbolic links. It depends on the optionLinkOption.NOFOLLOW_LINKS. Non-symbolic (hard) links are out of scope, given that the copy behavior for them was already well-defined: they're treated as regular files.For the sake of conciseness, the following paragraphs use the term "link" for "symbolic link".
Without
NOFOLLOW_LINKSoption:FileSystemLoopException.With
NOFOLLOW_LINKSoption:All of this is also explained in the updated JavaDoc.
Thanks for your contribution to Apache Commons! Your help is appreciated!
Before you push a pull request, review this list:
mvn; that'smvnon the command line by itself.