Discuss this help topic in SecureBlackbox Forum

TElSimpleFTPSClient.FileExists

TElSimpleFTPSClient     See also     


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


Checks if the file exists.

Declaration

[C#]
    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)

[Java]
    boolean 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 its 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