aboutsummaryrefslogtreecommitdiff
path: root/src/property.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-02 14:06:53 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-02 14:08:56 -0700
commit159ff0bda5c67767599509313468c157118ad70e (patch)
treec53e8a3cbfbb879afa2f49407d3c8bfdb38d9aac /src/property.lisp
parent8f8c59341e7f420397f79d47af2787ca55fba07b (diff)
downloadconsfigurator-159ff0bda5c67767599509313468c157118ad70e.tar.gz
rename READFILE, WRITEFILE, corresponding generics and some wrappers
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property.lisp')
-rw-r--r--src/property.lisp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/property.lisp b/src/property.lisp
index 587f757..3987764 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -575,17 +575,18 @@ the actual state of the host but without making any changes.
Not to be confused with INAPPLICABLE-PROPERTY.")
-(defun maybe-writefile-string (path content &key (mode nil mode-supplied-p))
- "Wrapper around WRITEFILE which returns :NO-CHANGE and avoids writing PATH if
-PATH already has the specified CONTENT and MODE."
+(defun maybe-write-remote-file-string
+ (path content &key (mode nil mode-supplied-p))
+ "Wrapper around WRITE-REMOTE-FILE which returns :NO-CHANGE and avoids writing
+PATH if PATH already has the specified CONTENT and MODE."
(if (and (remote-exists-p path)
(multiple-value-bind (existing-mode existing-size)
(remote-file-stats path)
(and (or (not mode-supplied-p) (= mode existing-mode))
(and (>= (* 4 (length content)) existing-size)
- (string= (readfile path) content)))))
+ (string= (read-remote-file path) content)))))
:no-change
- (apply #'writefile
+ (apply #'write-remote-file
path content (and mode-supplied-p `(:mode ,mode)))))
(defun assert-euid-root ()