@Override
  public boolean isDirectory() {
    return pathString.endsWith(File.separator);
  }
@Test
  public void testIsDirectory() {
    // TODO: Java core test failing on windows, https://github.com/apache/beam/issues/20480
    assumeFalse(SystemUtils.IS_OS_WINDOWS);
    assertTrue(toResourceIdentifier("/").isDirectory());
    assertTrue(toResourceIdentifier("/root/tmp/").isDirectory());
    assertFalse(toResourceIdentifier("/root").isDirectory());
  }