System.Net.Tests.FtpWebRequestTest.FileExists C# (CSharp) Method

FileExists() private static method

private static FileExists ( FtpExecutionMode mode, string file ) : bool
mode FtpExecutionMode
file string
return bool
        private static bool FileExists(FtpExecutionMode mode, string file)
        {
            try
            {
                DoDownload(mode, WebRequestMethods.Ftp.DownloadFile, file);
                return true;
            }
            catch (WebException) { }

            return false;
        }
    }