Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Make-directory-path/Lua/make-directory-path.lua
Normal file
11
Task/Make-directory-path/Lua/make-directory-path.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require("lfs")
|
||||
|
||||
function mkdir (path)
|
||||
local sep, pStr = package.config:sub(1, 1), ""
|
||||
for dir in path:gmatch("[^" .. sep .. "]+") do
|
||||
pStr = pStr .. dir .. sep
|
||||
lfs.mkdir(pStr)
|
||||
end
|
||||
end
|
||||
|
||||
mkdir("C:\\path\\to\\dir") -- Quoting backslashes requires escape sequence
|
||||
Loading…
Add table
Add a link
Reference in a new issue