tumblr tracker

IsDirectory

Library Reference ›› FTP ››
Parent Previous Next

FTP.IsDirectory


Namespace: FTP


Checks if FTP path is a directory or a file.


retval = FTP.IsDirectory(FtpClient, Path)


Parameters:

- FtpClient; a handle variable returned from a previous call to CreateFtpClient;

- Path; string constant or variable containing the slash delimited FTP path to check


Returns:

true if the Path is directory or false otherwise; boolean value.


Example


$FtpClient = FTP.CreateFtpClient("moscripto.com", 21, "moscriptoftpdemo", "demopass");

if (Error.IsError())
{
   MessageBox.ShowError(Error.GetErrorMessage());
   Error.ClearError();
}
Else
{
   If (FTP.IsDirectory($FtpClient, "some/path/on/the/server"))
   {
       MessageBox.ShowInfo("Path is directory.");
   }
   Else
   {
       MessageBox.ShowInfo("Path is NOT directory.");
   }
   
   FTP.DestroyFtpClient($FtpClient);
}