You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/org/apache/commons/io/filefilter/SymbolicLinkFileFilter.java
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -124,9 +124,11 @@ public FileVisitResult accept(final Path path, final BasicFileAttributes attribu
124
124
}
125
125
126
126
/**
127
-
* Package access, so the unit test may override to mock it. To
128
-
* facilitate unit testing, all calls to test if the file is a symbolic should go
129
-
* through this method. (See the unit test for why.)
127
+
* Delegates to {@link Files#isSymbolicLink(Path)} for testing.
128
+
* <p>
129
+
* Using package access for unit tests. To facilitate unit testing, all calls to test if the file is a symbolic should go through this method. (See the unit
130
+
* test for why.)
131
+
* </p>
130
132
*
131
133
* @param filePath The filePath to test
132
134
* @return true if the file exists and is a symbolic link to either a file or directory, false otherwise.
// Fortunately, delete() doesn't throw an exception if the file doesn't exist.
87
+
testLinkDirFile.delete();
88
+
targetDirFile.delete();
89
+
testLinkFile.delete();
90
+
testTargetFile.delete();
91
+
}
92
+
89
93
/**
90
-
* <p>Unit test setup creates a hard file, a symbolic link to the hard file, a hard directory,
91
-
* and a symbolic link to that directory. All are created in the temp directory</p>
92
-
* <p>Unit test teardown deletes all four of these files.</p>
94
+
* <p>
95
+
* Unit test setup creates a hard file, a symbolic link to the hard file, a hard directory, and a symbolic link to that directory. All are created in the
96
+
* temp directory
97
+
* </p>
98
+
* <p>
99
+
* Unit test teardown deletes all four of these files.
100
+
* </p>
93
101
*
94
102
* @throws IOException If it fails to create the temporary files
0 commit comments