Re: How to create a symbolic link?
Pascal Bourguignon <[email protected]>
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
> On 16 Dec 2016, at 02:46, Jean Louis <[email protected]> wrote: > > Hello, > > I cannot find the function on how to create a symbolic link with > clisp. > There is none. > or do I need to use external commands? > You can use FFI to call symlink(2). C/USER[14]> (ffi:def-call-out symlink (:name "symlink") (:arguments (p1 ffi:c-string :in) (p2 ffi:c-string :in)) (:return-type ffi:int) (:language :stdc)) SYMLINK C/USER[15]> (symlink "/tmp/foo" "/tmp/bar") 0 C/USER[17]> (ext:shell "ls -l /tmp/bar") lrwxrwxrwx 1 pjb pjb 8 Dec 16 02:58 /tmp/bar -> /tmp/foo NIL C/USER[18]> -- __Pascal J. Bourguignon__ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list