public List<String> getSiblings(String path) {
    File currentFile = new File(path);

    // if currentFile is not a dir, convert currentFile to it's parent dir
    if (!currentFile.isDirectory()) {
      currentFile = currentFile.getParentFile();
      // a file needs to be in a directory, if the file's parent is null, that means user
      // typed a filename without "./" prefix, but meant to find the file in the current dir.
      if (currentFile == null) {
        currentFile = new File("./");
        path = null;
      } else {
        path = currentFile.getPath();
      }
    }

    // at this point, currentFile should be a directory, we need to return all the files
    // under this directory
    String prefix;
    if (path == null) {
      prefix = "";
    } else {
      prefix = path.endsWith(File.separator) ? path : path + File.separator;
    }

    return Stream.of(currentFile)
        .map(File::list)
        .filter(Objects::nonNull)
        .flatMap(Stream::of)
        .map(s -> prefix + s)
        .collect(Collectors.toList());
  }
if path is a dir, it will return the list of files under this dir. if path is a filename, it
will return all the siblings of this file
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/converters/FilePathStringConverter.java