$isdir

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 directory exists.

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

Examples

alias dir_exists {
  if ($isdir($1)) { return directory exists! } 
  else { return directory doesn't exist }
}

See Also

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