4

Unable to write to a text file in Windows Phone

 3 years ago
source link: https://www.codesd.com/item/unable-to-write-to-a-text-file-in-windows-phone.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Unable to write to a text file in Windows Phone

advertisements

Ok so I need to write to a text file on my home network in c#. The problem is that I cant use anything with System.IO.File because it is not supported on Windows Phone. I'm trying to use System.IO.StreamWriter but this is creating a problem.

System.IO.StreamWriter ow;
ow = new System.IO.StreamWriter(@"\\RASPBERRYPI\pi\led.txt");

This is as far as I have got and it says:

"Cannot convert from string to System.IO.Stream"

I have been searching for an answer for this but nobody seems to have this problem.


You can't. Windows Phone does not support accessing SMB / network file shares.

Related Articles

unable to write and add text file android

I am trying to write a text file for logging in my app. When it comes to execution, there are READ-ONLY EXCEPTION and hence cannot write the text file. only file 1" can be executed Now using 5.0.1 The below is my code : public static void writefile(S

Loading the TEXT file in Windows Phone 8.1

Thanks to the below link, I've found out how to load a TXT file into my Windows Phone 8.1 app. My question is specifically tied to WHY my code doesn't work. (My code begins after link to the other StackOverflow question). This is the same question, w

LINQ to text file in Windows Phone 7

Is it possible to read a text file using linq in wp7. My requirement is i need to read the below given text file content and to form a list, How i can implement this in windows phone. The format of my text file is. Game::Cricket::England::Pakistan Ga

Unable to write to a text file using timer in C #

I am still newbie to C# and I'm making a test program that writes the DateTime.Now every second. I tried using this and it worked: StreamWriter sw = new StreamWriter("D:\Hello.txt", true); sw.WriteLine(DateTime.Now); sw.Close(); However, when I

How to write text in a Windows Phone 8 file?

I found this example of how to write data to a file in Windows Phone 8: https://stackoverflow.com/a/15625701/181771 public async Task WriteDataToFileAsync(string fileName, string content) { byte[] data = Encoding.Unicode.GetBytes(content); var folder

iterate through a text file and write a new text file for each python line

I am trying to accomplish what seems to be a simple task but I seem to be unable to figure it out. I am a Python rookie. Here is my task: I have a text file that contains a list of numbers, each on a separate line... 100101 100201 100301 100401 10050

How do I write in the text file out of scope, it is set to?

How can i write to a text file outside of the scope it is created in? say for example my code looks a bit like this: try { StreamWriter file = new StreamWriter(path); } catch (NullReferenceException) //unable to create file { MessageBox.Show("Cannot

How to write to a text file in an activity & amp; to read this file in another activity?

I am able to write and then read a text file in the SAME activity, but I am unable to read a text file after writing to it from another Activity. Ex: Activity A creates and writes to a text file. Activity B reads that text file. I use this code to wr

Write to a text file using Javascript

I want to write to a text file using javascript. I know that it is possible but there are some problems. I am running a javascript program that calculates the location of an object (its latitude & longitude) which changes every 5 seconds; i want to w

How do I write to a text file by replacing the number on the same line?

This is my code in a timer tick event interval ever minute. postsCounter += 1; label2.Text = postsCounter.ToString(); label2.Visible = true; w.WriteLine(postsCounter.ToString()); w is a StreamWriter But instead adding every minute a new line like 1 2

How do I write to a text file using AppleScript?

So, that's it. How can I write to a text file using AppleScript? I've tried googling around, but answers seem to be years old and I'm not really sure what should be the preferred idiom this days. on write_to_file(this_data, target_file, append_data)

Not able to write to a text file

I need to write a string into a file. For that, my code is: -(void)writeToFile:(NSString *)fileName: (NSString *)data { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [

c # write to the text file on the site via php

Within c#, i can put data to seperate strings. For example the current date i put to a string called line1 and some info i put to a string called line2. What i want to do now, is sent these 2 strings to a web adress that handles these lines, and writ

How to write to a text file until the request is closed

I would like to write to a text file, but I have small problem. When use the code below, it writes just once. StreamWriter fileWriter = new StreamWriter("test.txt"); fileWriter.WriteLine(jointHead.Position.X); fileWriter.Close(); When I write li

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK