Consider allowing retrieval of file metadata in Sftp utilities #583
Closed
sleberknight
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Just realized in that comment that we might not get that information, since it specifically notes "present only if flag SSH_XXX" for each of the items...so maybe not worth it after all...would need to do some investigation and experimentation. |
Beta Was this translation helpful? Give feedback.
1 reply
-
The few services we had that were still using SFTP for anything have now been decommissioned, so this is no longer needed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently we can get the file names but we cannot get the additional file metadata such as file size, creation and modification times, etc. JSch provides this information via the
LsEntry
(inner class inChannelSftp
). In addition to file name it contains "longname" (not sure what that is...) as well as an instance ofSftpATTRS
which contains metadata as described in the comment at the top of the class, which I'm reproducing here:So, we could get a bunch of additional information that might be useful (for example the size and the modified time, which would be useful in use cases that poll remote servers).
We could add one or more new methods in
SftpTransfers
that either return the native JSchLsEntry
or we could wrapper and modernize those a bit...Beta Was this translation helpful? Give feedback.
All reactions