private static Collection<FileTargetContext> filterLocalFsContexts(Collection<? extends FileTargetContext> contexts) {
    return ContainerUtil.filter(contexts, c -> {
      VirtualFile file = c.getFileSystemItem().getVirtualFile();
      return file != null && c.getFileSystemItem().isDirectory() && file.isInLocalFileSystem();
    });
  }
private static Collection<FileTargetContext> filterLocalFsContexts(Collection<? extends FileTargetContext> contexts)