Difference between revisions of "$isfile"

From Scriptwiki
Jump to: navigation, search
m (redirect)
m (separate page)
 
Line 1: Line 1:
#redirect [[$exists]]
+
Returns informations on whether or not a file exists.
 +
 
 +
$isfile($mircdir $+ mirc.ini) // returns $true (is a file)
 +
$isfile($mircdir)            // returns $false (is a directory)
 +
 
 +
== Examples ==
 +
 
 +
alias file_exists {
 +
  if ($isfile($1)) { return file exists! }
 +
  else { return file doesn't exist }
 +
}
 +
 
 +
== See Also ==
 +
* [[$isdir]] Check if a directory exists.<br />
 +
* [[$exists]] Check if a file OR directory exists.<br />
 +
 
 +
[[Category:File and Directory Identifiers]]

Latest revision as of 09:49, 18 May 2007

Returns informations on whether or not a file exists.

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

Examples

alias file_exists {
  if ($isfile($1)) { return file exists! } 
  else { return file doesn't exist }
}

See Also

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