Question

I am trying to list all files on a remote system. To do this, I used an sftp channel to that system. JCraft channel sftp provides a Ls method which returns a list of files and folders, but not the hidden files/folder (starting with a ".").

Is there any way to do this?

Thanks

Was it helpful?

Solution

It appears that you need to use the ls method like so:

sftp.ls(".*")

to get the "hidden" files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top