CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2018
    Location
    USA
    Posts
    1

    writing file Filewriter.write(blob) windows10

    the cordova-plugin-file that I use for my ios application does not support FileWriter.write(blob) on windows10.

    After looking for an alternative, I really can't find anything. Any ideas how to tackle this issue?

    Thx in advance

  2. #2
    Join Date
    Dec 2018
    Posts
    15

    Re: writing file Filewriter.write(blob) windows10

    You may try this code:

    Code:
    public void LogFile(string sExceptionName, string sEventName, string sControlName, int       nErrorLineNo, string sFormName)
            {
                StreamWriter log;
                if (!File.Exists("logfile.txt"))
                {
                    log = new StreamWriter("logfile.txt");
                }
                else
                {
                    log = File.AppendText("logfile.txt");
                }
                // Write to the file:
                log.WriteLine("Data Time:" + DateTime.Now);
                log.WriteLine("Exception Name:" + sExceptionName);
                log.WriteLine("Event Name:" + sEventName);
                log.WriteLine("Control Name:" + sControlName);
                log.WriteLine("Error Line No.:" + nErrorLineNo);
                log.WriteLine("Form Name:" + sFormName);
                // Close the stream:
                log.Close();
            }
        }
    Last edited by 2kaud; January 5th, 2019 at 04:59 AM. Reason: Added code tags

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured