| 180 | } |
| 181 | |
| 182 | int FTPClientWrapperSSH::Pwd(char* buf, size_t size) { |
| 183 | char * sftppath = sftp_canonicalize_path(m_sftpsession, "."); |
| 184 | if (!sftppath) |
| 185 | return OnReturn(-1); |
| 186 | |
| 187 | size_t len = strlen(sftppath); |
| 188 | if (len > (size-1)) { |
| 189 | ssh_string_free_char(sftppath); |
| 190 | return OnReturn(-1); |
| 191 | } |
| 192 | |
| 193 | strncpy(buf, sftppath, size); |
| 194 | if (len > 1 && buf[len-1] == '/') |
| 195 | buf[len-1] = 0; |
| 196 | |
| 197 | ssh_string_free_char(sftppath); |
| 198 | |
| 199 | return OnReturn(0); |
| 200 | } |
| 201 | |
| 202 | int FTPClientWrapperSSH::Rename(const char * from, const char * to) { |
| 203 | int retcode = sftp_rename(m_sftpsession, from, to); |
nothing calls this directly
no outgoing calls
no test coverage detected