@@ -184,6 +184,21 @@ private void consumeRemaining(final Iterator<File> iterator) {
184184 }
185185 }
186186
187+ private void createCircularOsSymLink (final String linkName , final String targetName ) throws IOException {
188+ if (FilenameUtils .isSystemWindows ()) {
189+ // Windows
190+ try {
191+ Runtime .getRuntime ().exec ("mklink /D " + linkName + " " + targetName );
192+ } catch (final IOException ioe ) {
193+ // So that tests run in FAT filesystems don't fail
194+ ioe .printStackTrace ();
195+ }
196+ } else {
197+ // Not Windows, assume Linux
198+ Runtime .getRuntime ().exec ("ln -s " + targetName + " " + linkName );
199+ }
200+ }
201+
187202 /**
188203 * May throw java.nio.file.FileSystemException: C:\Users\...\FileUtilsTestCase\cycle: A required privilege is not held
189204 * by the client. On Windows, you are fine if you run a terminal with admin karma.
@@ -209,21 +224,6 @@ private void createCircularSymLink(final File file) throws IOException {
209224 assertTrue (Files .isSymbolicLink (linkPath ), () -> "Expected a sym link here: " + linkName );
210225 }
211226
212- private void createCircularOsSymLink (final String linkName , final String targetName ) throws IOException {
213- if (FilenameUtils .isSystemWindows ()) {
214- // Windows
215- try {
216- Runtime .getRuntime ().exec ("mklink /D " + linkName + " " + targetName );
217- } catch (final IOException ioe ) {
218- // So that tests run in FAT filesystems don't fail
219- ioe .printStackTrace ();
220- }
221- } else {
222- // Not Windows, assume Linux
223- Runtime .getRuntime ().exec ("ln -s " + targetName + " " + linkName );
224- }
225- }
226-
227227 private void createFilesForTestCopyDirectory (final File grandParentDir , final File parentDir , final File childDir ) throws Exception {
228228 final File childDir2 = new File (parentDir , "child2" );
229229 final File grandChildDir = new File (childDir , "grandChild" );
0 commit comments