diff --git a/CHANGES.md b/CHANGES.md index 15bb5b893e..7513838d70 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,6 @@ New: Fixed: -- Fixed `file.touch` (#3529) - Cleanup telnet commands on output shutdown, prevent commands registration for internal outputs (#3545, fixes: #3541) diff --git a/src/libs/file.liq b/src/libs/file.liq index c959a94325..7ab0f119a3 100644 --- a/src/libs/file.liq +++ b/src/libs/file.liq @@ -38,13 +38,6 @@ def file.write.stream(~perms=0o644, ~append=false, path) = write end -# Ensure that a file exists, creating it empty if it does not. -# @category File -# @param path Path of the file. -def file.touch(~perms=0o644, path) = - file.write(data="", perms=perms, append=true, path) -end - # Write data to a file. # @category File # @param ~data Data to write. If passing a callback `() -> string?`, the callback \ @@ -68,6 +61,13 @@ def replaces file.write(~data, ~perms=0o644, ~append=false, path) = write() end +# Ensure that a file exists, creating it empty if it does not. +# @category File +# @param path Path of the file. +def file.touch(~perms=0o644, path) = + file.write(data="", perms=perms, append=true, path) +end + # Read the whole contents of a file. # @category File def file.contents(fname) =