2020-12-28 16:18:03 +01:00
|
|
|
local core = require "core"
|
|
|
|
local command = require "core.command"
|
2021-06-13 19:50:42 +02:00
|
|
|
local common = require "core.common"
|
2021-06-07 22:44:35 +02:00
|
|
|
|
2020-12-28 16:18:03 +01:00
|
|
|
command.add(nil, {
|
|
|
|
["files:create-directory"] = function()
|
2022-05-30 22:06:47 +02:00
|
|
|
core.command_view:enter("New directory name", {
|
|
|
|
submit = function(text)
|
|
|
|
local success, err, path = common.mkdirp(text)
|
|
|
|
if not success then
|
|
|
|
core.error("cannot create directory %q: %s", path, err)
|
|
|
|
end
|
2020-12-28 16:18:03 +01:00
|
|
|
end
|
2022-05-30 22:06:47 +02:00
|
|
|
})
|
2020-12-28 16:18:03 +01:00
|
|
|
end,
|
|
|
|
})
|