Function File.fileExists

Returns true if the file exists in the given path. Note: Many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the res://.import folder). To check for the existence of such resources while taking into account the remapping to their imported location, use ResourceLoader.exists. Typically, using File.file_exists on an imported resource would work while you are developing in the editor (the source asset is present in res://, but fail when exported).

bool fileExists (
  const(String) path
) nothrow @nogc const;