[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Making hard links from within chicken?
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Making hard links from within chicken? |
Date: |
Tue, 18 Jan 2005 09:30:24 +0100 |
On Tue, 18 Jan 2005 08:54:55 +0100, Sunnan <address@hidden> wrote:
To create hard links:
#>
#include <unistd.h>
<#
(define hard-link
(let ([link (foreign-lambda int "link" c-string c-string)])
(lambda (old new)
(unless (zero? (link old new))
(error 'hard-link "could not create link" old new) ) ) ) )
> So I figured: "is there a way to call system with separate args, instead
> of with a string, as in perl?" and went to check in the chicken manual.
>
> I couldn't find it, so I'm starting to think that maybe I'm using system
> way too often. (Spoiled with writing shell scripts.)
See `process-run' (posix unit).
> (And also, maybe I'm missing something obvious, but is there a simple
> way to copy files from within chicken besides opening them and rewriting
> them?)
No, there is no file-copying procedure. Either invoke "cp", or perform
I/O manually.
cheers,
felix