Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Feb 2, 2024
1 parent 92fcd72 commit 8bfcf3e
Showing 1 changed file with 46 additions and 5 deletions.
51 changes: 46 additions & 5 deletions src/main/java/org/apache/commons/io/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,12 @@ public static File[] convertFileCollectionToFileArray(final Collection<File> fil
* {@link File#setLastModified(long)}. If that fails, the method throws IOException.
* </p>
* <p>
* Symbolic links in the source directory are copied to new symbolic links in the destination
* directory that point to the original target. The target of the link is not copied unless
* it is also under the source directory. Even if it is under the source directory, the new symbolic
* link in the destination points to the original target in the source directory, not to the
* newly created copy of the target.
* Treatment of symbolic links inside {@code srcDir} depends on the target of the link.
* If the link points to a target outside of {@code srcDir} (and therefore is not copied),
* then {@code destDir} will contain link to the original, uncopied file.
* However, if the symbolic links point to a file inside {@code srcDir},
* the new link inside {@code destDir} will point to the copy of the target inside
* {@code destDir}.
* </p>
*
* @param srcDir an existing directory to copy, must not be {@code null}.
Expand All @@ -536,6 +537,14 @@ public static void copyDirectory(final File srcDir, final File destDir) throws I
* method merges the source with the destination, with the source taking precedence.
* </p>
* <p>
* Treatment of symbolic links inside {@code srcDir} depends on the target of the link.
* If the link points to a target outside of {@code srcDir} (and therefore is not copied),
* then {@code destDir} will contain link to the original, uncopied file.
* However, if the symbolic links point to a file inside {@code srcDir},
* the new link inside {@code destDir} will point to the copy of the target inside
* {@code destDir}.
* </p>
* <p>
* <strong>Note:</strong> Setting {@code preserveFileDate} to {@code true} tries to preserve the files' last
* modified date/times using {@link File#setLastModified(long)}. However it is not guaranteed that those operations
* will succeed. If the modification operation fails, the method throws IOException.
Expand Down Expand Up @@ -565,6 +574,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final bo
* method merges the source with the destination, with the source taking precedence.
* </p>
* <p>
* Treatment of symbolic links inside {@code srcDir} depends on the target of the link.
* If the link points to a target outside of {@code srcDir} (and therefore is not copied),
* then {@code destDir} will contain link to the original, uncopied file.
* However, if the symbolic links point to a file inside {@code srcDir},
* the new link inside {@code destDir} will point to the copy of the target inside
* {@code destDir}.
* </p>
* <p>
* <strong>Note:</strong> This method tries to preserve the files' last modified date/times using
* {@link File#setLastModified(long)}. However it is not guaranteed that those operations will succeed. If the
* modification operation fails, the method throws IOException.
Expand Down Expand Up @@ -614,6 +631,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final Fi
* method merges the source with the destination, with the source taking precedence.
* </p>
* <p>
* Treatment of symbolic links inside {@code srcDir} depends on the target of the link.
* If the link points to a target outside of {@code srcDir} (and therefore is not copied),
* then {@code destDir} will contain link to the original, uncopied file.
* However, if the symbolic links point to a file inside {@code srcDir},
* the new link inside {@code destDir} will point to the copy of the target inside
* {@code destDir}.
* </p>
* <p>
* <strong>Note:</strong> Setting {@code preserveFileDate} to {@code true} tries to preserve the file's last
* modified date/times using {@link BasicFileAttributeView#setTimes(FileTime, FileTime, FileTime)}. However, it is
* not guaranteed that the operation will succeed. If the modification operation fails it falls back to
Expand Down Expand Up @@ -664,6 +689,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final Fi
* method merges the source with the destination, with the source taking precedence.
* </p>
* <p>
* Treatment of symbolic links inside {@code srcDir} depends on the target of the link.
* If the link points to a target outside of {@code srcDir} (and therefore is not copied),
* then {@code destDir} will contain link to the original, uncopied file.
* However, if the symbolic links point to a file inside {@code srcDir},
* the new link inside {@code destDir} will point to the copy of the target inside
* {@code destDir}.
* </p>
* <p>
* <strong>Note:</strong> Setting {@code preserveFileDate} to {@code true} tries to preserve the file's last
* modified date/times using {@link BasicFileAttributeView#setTimes(FileTime, FileTime, FileTime)}. However, it is
* not guaranteed that the operation will succeed. If the modification operation fails it falls back to
Expand Down Expand Up @@ -734,6 +767,14 @@ public static void copyDirectory(final File srcDir, final File destDir, final Fi
* method merges the source with the destination, with the source taking precedence.
* </p>
* <p>
* Treatment of symbolic links inside {@code srcDir} depends on the target of the link.
* If the link points to a target outside of {@code srcDir} (and therefore is not copied),
* then {@code destDir} will contain link to the original, uncopied file.
* However, if the symbolic links point to a file inside {@code srcDir},
* the new link inside {@code destDir} will point to the copy of the target inside
* {@code destDir}.
* </p>
* <p>
* <strong>Note:</strong> Setting {@code preserveFileDate} to {@code true} tries to preserve the file's last
* modified date/times using {@link BasicFileAttributeView#setTimes(FileTime, FileTime, FileTime)}. However, it is
* not guaranteed that the operation will succeed. If the modification operation fails it falls back to
Expand Down

0 comments on commit 8bfcf3e

Please sign in to comment.