aboutsummaryrefslogtreecommitdiff
path: root/data/core/commands/files.lua
blob: b2fdb3369323231760a7577476a5cefd2f0ad4b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
local core = require "core"
local command = require "core.command"
local common = require "core.common"

command.add(nil, {
  ["files:create-directory"] = function()
    core.command_view:enter("New directory name", function(text)
      local success, err, path = common.mkdirp(text)
      if not success then
        core.error("cannot create directory %q: %s", path, err)
      end
    end)
  end,
})