dirname
Definition
-- @/lua/common/utils.lua:1048
path.dirname = function (filename)
while true do
if filename == "" or string.sub(filename, -1) == "/" then
break
end
filename = string.sub(filename, 1, -2)
end
if filename == "" then
filename = "."
end
return filename
end
Callers
@/lua/ge/server/server.lua
local levelDir = path.dirname(levelPath)
if string.sub(levelDir, -1) ~= '/' then
@/lua/ge/extensions/editor/rallyEditor/pacenotes/customForm.lua
if editor.uiIconImageButton(editor.icons.folder_open, im.ImVec2(20, 20), im.ImVec4(1, 1, 1, 1)) then
-- local dir = path.dirname(fname)
-- dump(dir)
if editor.uiIconImageButton(editor.icons.content_copy, im.ImVec2(20, 20), im.ImVec4(1, 1, 1, 1)) then
im.SetClipboardText(path.dirname(fnames[1]))
end
@/lua/ge/extensions/editor/rallyEditor/pacenotes/structuredForm.lua
if editor.uiIconImageButton(editor.icons.folder_open, im.ImVec2(20, 20), im.ImVec4(1, 1, 1, 1)) then
Engine.Platform.exploreFolder(path.dirname(fnames[1]))
end
if editor.uiIconImageButton(editor.icons.content_copy, im.ImVec2(20, 20), im.ImVec4(1, 1, 1, 1)) then
im.SetClipboardText(path.dirname(fnames[1]))
end