$exists

From Scriptwiki
Revision as of 09:49, 18 May 2007 by Cail (talk | contribs) (separate page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns informations on whether or not a file or directory exists.

$exists($mircdir $+ mirc.ini) // returns $true (is a file)
$exists($mircdir)             // returns $true (is a directory)

Examples

alias file_dir_exists {
  if ($exists($1)) { return file/directory exists! } 
  else { return file/directory doesn't exist }
}

See Also

  • $isfile Check if a file exists.
  • $isdir Check if a directory exists.