home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncftp.com / ftp.ncftp.com.zip / ftp.ncftp.com / ncftp / older_versions / ncftp-3.2.2-src.tar.bz2 / ncftp-3.2.2-src.tar / ncftp-3.2.2 / libncftp / c_symlink.c < prev    next >
C/C++ Source or Header  |  2005-01-01  |  641b  |  27 lines

  1. /* c_symlink.c
  2.  *
  3.  * Copyright (c) 1996-2005 Mike Gleason, NcFTP Software.
  4.  * All rights reserved.
  5.  *
  6.  */
  7.  
  8. #include "syshdrs.h"
  9. #ifdef PRAGMA_HDRSTOP
  10. #    pragma hdrstop
  11. #endif
  12.  
  13. int
  14. FTPSymlink(const FTPCIPtr cip, const char *const lfrom, const char *const lto)
  15. {
  16.     if (strcmp(cip->magic, kLibraryMagic))
  17.         return (kErrBadMagic);
  18.     if ((cip == NULL) || (lfrom == NULL) || (lto == NULL))
  19.         return (kErrBadParameter);
  20.     if ((lfrom[0] == '\0') || (lto[0] == '\0'))
  21.         return (kErrBadParameter);
  22.     if (FTPCmd(cip, "SITE SYMLINK %s %s", lfrom, lto) == 2)
  23.         return (kNoErr);
  24.     cip->errNo = kErrSYMLINKFailed;
  25.     return (kErrSYMLINKFailed);
  26. }    /* FTPSymlink */
  27.