[r6rs-discuss] [Formal] Please give us file-exists? and delete-file.

From: Jed Davis <r6rs>
Date: Fri Nov 17 20:37:57 2006

On Fri, Nov 17, 2006 at 12:31:38PM -0500, Aubrey Jaffer wrote:
> slib/scheme48.init defines these two procedures. Trying to excerpt
> from slib-3a4 for Scheme-48-1.3:
[...]
> (define (delete-file file-name)
> (system (string-append "rm " file-name)))

(delete-file "anything with spaces")
(delete-file "or `cp /bin/sh /tmp/ && chmod 4555 /tmp/sh` backquotes")

Among the benefits of standardizing a delete-file procedure would be the
avoidance of common mistakes like this.

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))
Received on Fri Nov 17 2006 - 20:37:48 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC