Mercurial Hosting > luan
comparison src/luan/modules/Io.luan @ 1571:a23b02693d3b
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 18 Nov 2020 20:44:09 -0700 |
parents | 81288d8b20a2 |
children | c922446f53aa |
comparison
equal
deleted
inserted
replaced
1570:81288d8b20a2 | 1571:a23b02693d3b |
---|---|
79 Io.output_to(out,fn) | 79 Io.output_to(out,fn) |
80 out.close() | 80 out.close() |
81 return string_uri.read_text() | 81 return string_uri.read_text() |
82 end | 82 end |
83 | 83 |
84 function Io.relative_file_name(path) | 84 function Io.relative_file_uri_string(path) |
85 local f = LuanException.getLuanStackTrace()[2].getFileName() | 85 local f = LuanException.getLuanStackTrace()[2].getFileName() |
86 f = uri(f) | 86 f = uri(f) |
87 f.parent or error "source isn't file" | 87 f.parent or error "source isn't file" |
88 return f.parent().to_uri_string().."/"..path | 88 return f.parent().to_uri_string().."/"..path |
89 end | 89 end |