Discuss this help topic in SecureBlackbox Forum


TElSimpleFTPSClient     See also     

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

Checks if the file exists.


    bool FileExists(string AFilename);

    Function FileExists(ByVal AFilename As String) As Boolean

    function FileExists(const AFilename) : boolean;

    bool FileExists(const std::string &AFilename);

    bool FileExists(string $AFilename)


  • 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)


    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