Skip to content

Commit 3418d09

Browse files
author
Gary Gregory
committed
Javadoc.
1 parent a8184d6 commit 3418d09

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/main/java/org/apache/commons/io/FilenameUtils.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,35 +453,43 @@ private static String doNormalize(final String fileName, final char separator, f
453453
* The effect is equivalent to resultant directory after changing
454454
* directory to the first argument, followed by changing directory to
455455
* the second argument.
456+
* </p>
456457
* <p>
457458
* The first argument is the base path, the second is the path to concatenate.
458459
* The returned path is always normalized via {@link #normalize(String)},
459460
* thus {@code ..} is handled.
461+
* </p>
460462
* <p>
461463
* If {@code pathToAdd} is absolute (has an absolute prefix), then
462464
* it will be normalized and returned.
463465
* Otherwise, the paths will be joined, normalized and returned.
466+
* </p>
464467
* <p>
465468
* The output will be the same on both Unix and Windows except
466469
* for the separator character.
470+
* </p>
467471
* <pre>
468472
* /foo/ + bar --&gt; /foo/bar
469473
* /foo + bar --&gt; /foo/bar
470474
* /foo + /bar --&gt; /bar
471475
* /foo + C:/bar --&gt; C:/bar
472-
* /foo + C:bar --&gt; C:bar (*)
476+
* /foo + C:bar --&gt; C:bar [1]
473477
* /foo/a/ + ../bar --&gt; /foo/bar
474478
* /foo/ + ../../bar --&gt; null
475479
* /foo/ + /bar --&gt; /bar
476480
* /foo/.. + /bar --&gt; /bar
477481
* /foo + bar/c.txt --&gt; /foo/bar/c.txt
478-
* /foo/c.txt + bar --&gt; /foo/c.txt/bar (!)
482+
* /foo/c.txt + bar --&gt; /foo/c.txt/bar [2]
479483
* </pre>
480-
* (*) Note that the Windows relative drive prefix is unreliable when
484+
* <p>
485+
* [1] Note that the Windows relative drive prefix is unreliable when
481486
* used with this method.
482-
* (!) Note that the first parameter must be a path. If it ends with a name, then
487+
* </p>
488+
* <p>
489+
* [2] Note that the first parameter must be a path. If it ends with a name, then
483490
* the name will be built into the concatenated path. If this might be a problem,
484491
* use {@link #getFullPath(String)} on the base path argument.
492+
* </p>
485493
*
486494
* @param basePath the base path to attach to, always treated as a path
487495
* @param fullFileNameToAdd the fileName (or path) to attach to the base

0 commit comments

Comments
 (0)