Discuss this help topic in SecureBlackbox Forum

TElSimpleFTPSClient.FileExists

TElSimpleFTPSClient     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Checks if the file exists.

Declaration

[C#/Java]
    bool FileExists(string AFileName);

[VB.NET]
    Function FileExists(ByVal AFilename As String) As Boolean

[Pascal]
    function FileExists(const AFilename) : boolean;

[C++]
    bool FileExists(const std::string &AFilename);

[PHP]
    bool FileExists(string $AFilename)

Parameters

  • AFilename - the name (no path) of the file to be checked

Return value

    True if the file exists and is a file (not a directory or anything else)

Description

    Use this method to check if the file exists in the current remote directory. This method attempts to use SIZE and MLST commands if available, otherwise reverts to LIST command.

    General rule is that you specify only the name of the file, and check it's presence in current directory. If you need to check the file with path, change the directory using CWD command before calling this method. Behavior of the method in case when AFilename contains a path is undefined (server-dependent).

See also:     DirectoryExists     ListDirectory    

Discuss this help topic in SecureBlackbox Forum