Module:FileExists

local libraryUtil = require('libraryUtil')

return function(file) libraryUtil.checkTypeMulti('fileExists', 1, file, { 'string', 'table' })

if type(file) == 'string' then file = mw.title.new(file) end

local success, result = pcall(function(x) return x.fileExists end, file) return (success and result) end