Function: tramp-smb-handle-make-symbolic-link

tramp-smb-handle-make-symbolic-link is a byte-compiled function defined in tramp-smb.el.gz.

Signature

(tramp-smb-handle-make-symbolic-link TARGET LINKNAME &optional OK-IF-ALREADY-EXISTS)

Documentation

Like make-symbolic-link for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-smb.el.gz
(defun tramp-smb-handle-make-symbolic-link
    (target linkname &optional ok-if-already-exists)
  "Like `make-symbolic-link' for Tramp files."
  (let ((v (tramp-dissect-file-name (expand-file-name linkname))))
    (unless (tramp-smb-get-cifs-capabilities v)
      (tramp-error v 'file-error "make-symbolic-link not supported")))

  (tramp-skeleton-make-symbolic-link target linkname ok-if-already-exists
    (unless (tramp-smb-send-command
	     v (format "symlink %s %s"
		       (tramp-smb-shell-quote-argument target)
		       (tramp-smb-shell-quote-localname v)))
      (tramp-error
       v 'file-error
       "error with make-symbolic-link, see buffer `%s' for details"
       (tramp-get-connection-buffer v)))))