aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-08-23 23:40:30 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-08-23 23:40:30 +0200
commitf3454d571e53358b248fd7071828f6cc13f1f2f5 (patch)
tree6fbda8852f1c62db44350edec6f0782e3b884e7c /libssh
parent1df1f86f7e1b2e28610ba338bb7898d55e8bd7ce (diff)
downloadlibssh-f3454d571e53358b248fd7071828f6cc13f1f2f5.tar.gz
libssh-f3454d571e53358b248fd7071828f6cc13f1f2f5.tar.xz
libssh-f3454d571e53358b248fd7071828f6cc13f1f2f5.zip
ssh_scp_request_get_{filename,permissions,size}
Diffstat (limited to 'libssh')
-rw-r--r--libssh/scp.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libssh/scp.c b/libssh/scp.c
index 2c891472..5bcfdd98 100644
--- a/libssh/scp.c
+++ b/libssh/scp.c
@@ -459,3 +459,27 @@ int ssh_scp_read(ssh_scp scp, void *buffer, size_t size){
}
return r;
}
+
+/** Gets the name of the directory or file being
+ * pushed from the other party
+ * @returns file name. Should not be freed.
+ */
+const char *ssh_scp_request_get_filename(ssh_scp scp){
+ return scp->request_name;
+}
+
+/** Gets the permissions of the directory or file being
+ * pushed from the other party
+ * @returns Unix permission string, e.g "0644". Should not be freed.
+ */
+const char *ssh_scp_request_get_permissions(ssh_scp scp){
+ return scp->request_mode;
+}
+
+/** Gets the size of the file being pushed
+ * from the other party
+ * @returns Numeric size of the file being read.
+ */
+size_t ssh_scp_request_get_size(ssh_scp scp){
+ return scp->filelen;
+}