diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-10 15:38:25 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-10 15:38:25 -0700 |
commit | 6c86aa50cba6f607c51ac6aa075bc682bf2b1f9b (patch) | |
tree | 366c6a0d3a1366d5025c9b705ef2ccfd6316bf5f /src/property/file.lisp | |
parent | e2a3c727d552fa251bfa1145c9b0c76248143972 (diff) | |
download | consfigurator-6c86aa50cba6f607c51ac6aa075bc682bf2b1f9b.tar.gz |
add FILE:DIRECTORY-EXISTS
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/file.lisp')
-rw-r--r-- | src/property/file.lisp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp index 5bebad6..996d524 100644 --- a/src/property/file.lisp +++ b/src/property/file.lisp @@ -79,3 +79,9 @@ Uses CL-PPCRE:REGEX-REPLACE, which see for the syntax of REPLACE." file (lambda (lines) (mapcar (lambda (line) (re:regex-replace regex line replace)) lines))))) + +(defprop directory-exists :posix (dir) + "Ensure that a directory and its parents exists." + (:desc (strcat dir " exists")) + (:apply + (mrun "mkdir" "-p" dir))) |