コード例 #1
0
        public static void Cleanup()
        {
            try
            {
                SecureFtpRepoUpdate.DeleteFile(uriFile, remoteUsername, remoteUserPassword, true /*enableSSL*/);
            }
            catch (Exception)
            {
                // it's ok for this calls to fail, if the file is not present, ignoring...
            }
            try
            {
                SecureFtpRepoUpdate.RemoveDirectory(uriDir, remoteUsername, remoteUserPassword, true /*enableSSL*/);
            }
            catch (Exception)
            {
                // it's ok for this calls to fail, if the directory is not present, ignoring...
            }

            string fullpath = Path.GetFullPath(dataDownloadFilePath);

            if (File.Exists(fullpath))
            {
                File.Delete(fullpath);
            }
        }
コード例 #2
0
 public void SecureFtpRepoUpdateTest_DeleteFile_UsingFtps()
 {
     SecureFtpRepoUpdate.DeleteFile(uriFile, remoteUsername, remoteUserPassword, true /*enableSSL*/);
 }