* FtpModDate - determine the modification date of a remote file * * return 1 if successful, 0 otherwise */
| 1277 | * return 1 if successful, 0 otherwise |
| 1278 | */ |
| 1279 | GLOBALDEF int FtpModDate(const char *path, char *dt, int max, netbuf *nControl) { |
| 1280 | char buf[TMP_BUFSIZ]; |
| 1281 | int rv = 1; |
| 1282 | |
| 1283 | if ((strlen(path) + 7) > sizeof(buf)) |
| 1284 | return 0; |
| 1285 | sprintf(buf, "MDTM %s", path); |
| 1286 | if (!FtpSendCmd(buf, '2', nControl)) |
| 1287 | rv = 0; |
| 1288 | else |
| 1289 | strncpy(dt, &nControl->response[4], max); |
| 1290 | return rv; |
| 1291 | } |
| 1292 | |
| 1293 | /* |
| 1294 | * FtpGet - issue a GET command and write received data to output |
nothing calls this directly
no test coverage detected