From 03adf2f5d1536c7de26e27193bffc10c5e7492ab Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 10 Dec 2007 17:59:26 +0000 Subject: [PATCH] split part of scheme/file into scheme/path, document them svn: r7938 original commit: ca5a7c5560ee5eb26252c239dbf33f672a9749ac --- collects/mzlib/file.ss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/collects/mzlib/file.ss b/collects/mzlib/file.ss index 3901693..2a6aa56 100644 --- a/collects/mzlib/file.ss +++ b/collects/mzlib/file.ss @@ -1,5 +1,6 @@ (module file scheme/base (require scheme/file + scheme/path (prefix-in mz: (only-in mzscheme open-input-file open-output-file))) @@ -27,6 +28,15 @@ find-files pathlist-closure) + (define (build-relative-path p . args) + (if (relative-path? p) + (apply build-path p args) + (error 'build-relative-path "base path ~s is absolute" p))) + + (define (build-absolute-path p . args) + (if (relative-path? p) + (error 'build-absolute-path "base path ~s is relative" p) + (apply build-path p args))) (define (find-library name . cp) (let ([dir (with-handlers ([exn:fail:filesystem? (lambda (exn) #f)])