[
https://issues.apache.org/jira/browse/IO-708?focusedWorklogId=543253&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-543253
]
ASF GitHub Bot logged work on IO-708:
-------------------------------------
Author: ASF GitHub Bot
Created on: 28/Jan/21 01:20
Start Date: 28/Jan/21 01:20
Worklog Time Spent: 10m
Work Description: garydgregory commented on a change in pull request #193:
URL: https://github.com/apache/commons-io/pull/193#discussion_r565755740
##########
File path: src/main/java/org/apache/commons/io/FileUtils.java
##########
@@ -1838,6 +1841,36 @@ public static boolean isSymlink(final File file) {
return file != null ? Files.isSymbolicLink(file.toPath()) : false;
}
+ /**
+ * Tests whether the specified file is an actual file.
+ * <p>
+ * This method delegates to {@link Files#isRegularFile(Path,
LinkOption...)}
+ * </p>
+ *
+ * @param file the file to test.
+ * @return true if the file is a regular file, see {@link
Files#isRegularFile(Path, LinkOption...)}.
+ * @since 2.9
+ * @see Files#isRegularFile(Path, LinkOption...)
+ */
+ public static boolean isRegularFile(final File file) {
Review comment:
IMO you could have a separate PR that only add "is" methods that cover
the Files.is() APIs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 543253)
Time Spent: 0.5h (was: 20m)
> Utilize more java.nio for FileUtils and friends
> -----------------------------------------------
>
> Key: IO-708
> URL: https://issues.apache.org/jira/browse/IO-708
> Project: Commons IO
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 2.8.0
> Reporter: Boris Unckel
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Currently o.a.c.io.FileUtils use a lot of java.io.File methods (exists,
> delete...). This should be migrated to java.nio.files.Files methods.
> Advantage: All nio IOExceptions are more expressive
--
This message was sent by Atlassian Jira
(v8.3.4#803005)