@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { return myFs.supportsSymlinks(); }
@Override public boolean supportsSymlinks() { LOG.debug("supportSymlinks():"); boolean support = super.supportsSymlinks(); LOG.debug("supportSymlinks(): supports=" + support); return support; }
@Test /** Test FileContext APIs when symlinks are not supported */ public void testUnsupportedSymlink() throws IOException { Path file = getTestRootPath(fc, "file"); Path link = getTestRootPath(fc, "linkToFile"); if (!fc.getDefaultFileSystem().supportsSymlinks()) { try { fc.createSymlink(file, link, false); Assert.fail("Created a symlink on a file system that "+ "does not support symlinks."); } catch (IOException e) { // Expected } createFile(file); try { fc.getLinkTarget(file); Assert.fail("Got a link target on a file system that "+ "does not support symlinks."); } catch (IOException e) { // Expected } Assert.assertEquals(fc.getFileStatus(file), fc.getFileLinkStatus(file)); } }
@Test /** Test FileContext APIs when symlinks are not supported */ public void testUnsupportedSymlink() throws IOException { Path file = getTestRootPath(fc, "file"); Path link = getTestRootPath(fc, "linkToFile"); if (!fc.getDefaultFileSystem().supportsSymlinks()) { try { fc.createSymlink(file, link, false); Assert.fail("Created a symlink on a file system that "+ "does not support symlinks."); } catch (IOException e) { // Expected } createFile(file); try { fc.getLinkTarget(file); Assert.fail("Got a link target on a file system that "+ "does not support symlinks."); } catch (IOException e) { // Expected } Assert.assertEquals(fc.getFileStatus(file), fc.getFileLinkStatus(file)); } }
@Test /** Test FileContext APIs when symlinks are not supported */ public void testUnsupportedSymlink() throws IOException { Path file = getTestRootPath(fc, "file"); Path link = getTestRootPath(fc, "linkToFile"); if (!fc.getDefaultFileSystem().supportsSymlinks()) { try { fc.createSymlink(file, link, false); Assert.fail("Created a symlink on a file system that "+ "does not support symlinks."); } catch (IOException e) { // Expected } createFile(file); try { fc.getLinkTarget(file); Assert.fail("Got a link target on a file system that "+ "does not support symlinks."); } catch (IOException e) { // Expected } Assert.assertEquals(fc.getFileStatus(file), fc.getFileLinkStatus(file)); } }