Difference between revisions of "$isfile"

From Scriptwiki
Jump to: navigation, search
m (page created)
 
m (separate page)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Returns informations on whether or not a file exists.
 
Returns informations on whether or not a file exists.
  
$isfile(file)
+
$isfile($mircdir $+ mirc.ini) // returns $true (is a file)
 
+
$isfile($mircdir)            // returns $false (is a directory)
Returns $true if the file exists, otherwise it will return $false
 
  
 
== Examples ==
 
== Examples ==
  
  alias exists? {
+
  alias file_exists {
  if ($isfile($1)) { return file exists! } | else { return file doesn't exist }
+
  if ($isfile($1)) { return file exists! }  
 +
  else { return file doesn't exist }
 
  }
 
  }
  
$isdir(C:\program files\mirc\mirc.ini)
+
== See Also ==
 
+
* [[$isdir]] Check if a directory exists.<br />
== See also ==
+
* [[$exists]] Check if a file OR directory exists.<br />
 
 
[[$isdir]] to check if a directory exists.
 
 
 
  
 
[[Category:File and Directory Identifiers]]
 
[[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.