From 6728587dfc6a5f4090f2673113ffedb2be924daf Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 20 Jul 2018 20:27:15 -0700 Subject: Auto-formatted and auto-upgraded everything! --- lib/os.nom | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/os.nom') diff --git a/lib/os.nom b/lib/os.nom index e29b5d1..a797d2b 100644 --- a/lib/os.nom +++ b/lib/os.nom @@ -1,8 +1,9 @@ -#!/usr/bin/env nomsu -V2.4.4.3 +#!/usr/bin/env nomsu -V2.5.4.3 # This file defines some actions that interact with the operating system and filesystem. use "core" + action [path of Nomsu file %filename]: lua> "for i,f in files.walk(\%filename) do return f end" barf "Could not find file: \%filename" @@ -37,7 +38,10 @@ action [..] write to file %filename %text, to file %filename write %text write %text to file %filename ..: - lua> "local file = io.open(\%filename, 'w')\nfile:write(\%text)\nfile:close()" + lua> ".." + local file = io.open(\%filename, 'w') + file:write(\%text) + file:close() action [line number of %pos in %str] (=lua "files.get_line_number(\%str, \%pos)") action [line %line_num in %str] (=lua "files.get_line(\%str, \%line_num)") \ No newline at end of file -- cgit v1.2.3