-
October 31st, 2018, 11:39 AM
#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
-
January 5th, 2019, 03:19 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|