From 89e46f760a11140db3cc4a4becd7a6941989c89a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 10 Mar 2015 22:23:17 -0700 Subject: * sysif.c (mkdir_nothrow_exists): New static function. (ensure_dir): New function. (sysif_init): ensure_dir registered as intrinsic. * txr.1: ensure_dir documented. --- txr.1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 75794618..a8c10b07 100644 --- a/txr.1 +++ b/txr.1 @@ -23989,9 +23989,10 @@ of the system timer. Actual sleep times may be rounded up to the nearest 10 millisecond multiple on a system where timed suspensions are triggered by a 100 Hz tick. -.coNP Function @ mkdir +.coNP Functions @ mkdir and @ ensure-dir .synb .mets (mkdir < path <> [ mode ]) +.mets (ensure-dir < path <> [ mode ]) .syne .desc .code mkdir @@ -24015,6 +24016,13 @@ for the newly created directory. If omitted, the requested permissions are are subject to the system .codn umask . +The function +.code ensure-dir +is similar to +.code mkdir +except that it attempts to create all the missing parent directories +as necessary, and does not throw an error if the directory exists. + .coNP Function @ chdir .synb .mets (chdir << path ) -- cgit v1.2.3