fake-sftp-server-rule icon indicating copy to clipboard operation
fake-sftp-server-rule copied to clipboard

Get a directory listing or use wildcard with existsFile

Open vincentml opened this issue 4 years ago • 0 comments

feature request

I need to test if a file has been created without knowing the exact name of the file. The existsFile() function does almost what I need but only works using an exact path and file name.

The scenario is that the application is placing a file in a particular SFTP folder and adding a timestamp to the file name. The path to the folder is known and part of the file name is known, but the timestamp included in the file name is not exactly predictable.

Could it be possible to use a glob pattern wildcard? For example existsFile("/path/*_file.txt")

Alternatively, could it be possible to retrieve a directory listing? For example: listDirectory("/path"). I could then check the result to see if the file is present.

vincentml avatar Oct 16 '20 04:10 vincentml