aboutsummaryrefslogtreecommitdiff
path: root/src/libjin-lua/scripts/path/path.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin-lua/scripts/path/path.lua')
-rw-r--r--src/libjin-lua/scripts/path/path.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libjin-lua/scripts/path/path.lua b/src/libjin-lua/scripts/path/path.lua
new file mode 100644
index 0000000..c6bcf41
--- /dev/null
+++ b/src/libjin-lua/scripts/path/path.lua
@@ -0,0 +1,10 @@
+
+jin.path = jin.path or {}
+
+-- Game root directory.
+jin.cwd = jin.args['cwd'] or '.'
+
+-- Get full path of a given path.
+function jin.path.full(path)
+ return jin.cwd .. '/' .. path
+end