MCPcopy Create free account
hub / github.com/Cpasjuste/pplay / FtpModDate

Function FtpModDate

src/filer/ftplib/ftplib.cpp:1279–1291  ·  view source on GitHub ↗

* FtpModDate - determine the modification date of a remote file * * return 1 if successful, 0 otherwise */

Source from the content-addressed store, hash-verified

1277 * return 1 if successful, 0 otherwise
1278 */
1279GLOBALDEF 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

Callers

nothing calls this directly

Calls 1

FtpSendCmdFunction · 0.85

Tested by

no test coverage detected