Module:FileExists

local checkTypeMulti = require( 'libraryUtil' ).checkTypeMulti

return function( file ) 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