Extracting Folder from presisten token of a previous selected folder

Hi, I’m trying to read the folder from the persistent token which I created when opening a file UXP.storage. FileSystemProvider.getFileForOpening. And need to store the output file in that same folder in which the source file is present. But unfortunately unable to extract the folder from the extract. Is it possible to extract the folder from the extract? Thanks in advance.