Module:FileExists

From EarthMC
Revision as of 14:21, 21 October 2023 by upgradewastaken (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:FileExists/doc

local p = {}

function p.fileExists(filename)
    local title = mw.title.new(filename, 'File')
    if not title then
        return false
    end

    return title.exists
end

return p