From 96e11c169cde65194c1136e6b40c1bbea35c813a Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 20 Apr 2026 14:47:58 +0200 Subject: create cli --- src/lib/path.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/lib/path.lua') diff --git a/src/lib/path.lua b/src/lib/path.lua index f99585b..a0be1e5 100644 --- a/src/lib/path.lua +++ b/src/lib/path.lua @@ -112,6 +112,20 @@ function Path:make_directory(opts) pipe:close() end +function Path:copy_to(target) + local pipe = io.popen('cp -r ' .. tostring(self) .. ' ' .. tostring(target)) + pipe:close() +end + +function Path:remove(opts) + local pipe = io.popen('rm ' .. + (opts.recursive and '-r ' or ' ') .. + (opts.force and '-f ' or ' ') .. + tostring(self) + ) + pipe:close() +end + return { tests = { function() -- cgit v1.2.3-70-g09d2