RosettaCodeData/Task/Check-that-file-exists/Racket/check-that-file-exists.rkt
Ingy döt Net 6f050a029e update
2013-06-05 21:47:54 +00:00

14 lines
282 B
Racket

#lang racket
;; here
(file-exists? "input.txt")
(file-exists? "docs")
;; in the root
(file-exists? "/input.txt")
(file-exists? "/docs")
;; or in the root with relative paths
(parameterize ([current-directory "/"])
(and (file-exists? "input.txt")
(file-exists? "docs")))