GE Lua Documentation

Press F to search!

getModFromPathSUPERSLOW

Definition


-- @/lua/ge/extensions/core/modmanager.lua:112

-- this call is really slow, use carefully
local function getModFromPath(vfsPath)
  local originArchivePath = FS:getOriginArchivePathRelative(vfsPath)
  --log('I', '', 'getModFromPath(' .. tostring(vfsPath) .. ') -> ' .. tostring(originArchivePath))
  if not originArchivePath then return nil end
  local _, filename, ext = path.splitWithoutExt(originArchivePath)
  return mods[filename]
end

Callers