@Override
  public boolean exists(String path, ExistsPOptions options) throws IOException {
    long syncIntervalMs = options.hasCommonOptions()
        ? (options.getCommonOptions().hasSyncIntervalMs()
        ? options.getCommonOptions().getSyncIntervalMs() : -1) :
        -1;
    try {
      return getGrpcFileInfo(path, syncIntervalMs) != null;
    } catch (FileNotFoundException e) {
      return false;
    }
  }
@Test
  public void testExists() throws Exception {
    File rootFolder = mTestFolder.newFolder("root");
    String rootPath = rootFolder.getAbsolutePath();
    assertTrue(mWorker.exists(rootPath, ExistsPOptions.getDefaultInstance()));
    String fileContent = "foobar";
    File f = mTestFolder.newFile("root/f");
    Files.write(f.toPath(), fileContent.getBytes());
    assertTrue(mWorker.exists(f.getAbsolutePath(), ExistsPOptions.getDefaultInstance()));
    mWorker.delete(f.getAbsolutePath(), DeletePOptions.getDefaultInstance());
    assertFalse(mWorker.exists(f.getAbsolutePath(), ExistsPOptions.getDefaultInstance()));
    mWorker.delete(rootPath, DeletePOptions.getDefaultInstance());
    assertFalse(mWorker.exists(rootPath, ExistsPOptions.getDefaultInstance()));
  }