Plugin API get main file name from a branch

figma.root.name gives current file name. When running a plugin within a branch, the name is branch name.

Is it possible to get main file name from a branch?