Home  |  Delphi .net Home  |  System.IO.Directory  |  Exists Method
  
Exists  
Method  
Returns True if the specified path exists on the current machine
Directory Class
System.IO NameSpace
CF1.  Function Exists ( PathString : String ) : Boolean;
CF : Methods with this mark are Compact Framework Compatible
Description
The method returns true if PathString path exists. If it does not exist, or is an invalid path specification, then false is returned.
Notes
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
Microsoft MSDN Links
System.IO
System.IO.Directory
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

uses
  System.IO;

begin
  if System.IO.Directory.Exists('C:\Program Files')
  then Console.WriteLine('Path exists')
  else Console.WriteLine('Path does not exist');

  Console.Readline;
end.
   Path exists
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author