I have string variable which represents the full path of some file, like:
x = "/home/user/.local/share/app/some_file" on Linux
orx = "C:\\Program Files\\app\\some_file" on Windows
I'm wondering if there is some programmatic way, better then splitting string manually to get to directory path
How do I return directory path (path without filename) in Lua, without loading additional library like LFS, as I'm using Lua extension from other application?