UI Designer - How to read a Directory

Hello,

In a process, I have a Groovy script that returns a list of files from a directory :

import java.nio.file.Files;

File dir = new File(myDirectoryPath);

def listeFic = dir.list();

It works if the directory is on the server.

I would like to do the same in an application page or an instantiation form, with a local directory on user's PC.

I assume I have to create a JavaScript variable, but I don't know how to code it in JavaScript.

Since then, all my attempts don't work.

Any idea ?

Regards,

Thierry.

Hi,
you may have a look the javascript File System API but note that it is a Non-standard API and should be be used with that in mind.

I do not know if there are other more standard implemention and I have no experience on this topic.

HTH
Romain

Hello,

I've tried to use the File System API, but didn't find how to access it correctly within a Javascript variable of my UI Form.