S sarkis Member Licensed User Longtime User Jan 14, 2015 #1 Hello, I am trying to write a txt file to the local hard drive while debugging. Here are commands. Dim WriteLevel, WriteWay As TextWriter WriteLevel.Initialize(File.OpenOutput(File.DirDefaultExternal, fileName ,False)) Path for fileName was configured while running AVD manager to the original file. Compiler created a folder by the name "fileName.lock" and a file within by the name "pid" The first question is what means "mnt" in line mnt\sdcard\Android\data\... How to write a file to any folder in the local drive Thanks Last edited: Jan 15, 2015
Hello, I am trying to write a txt file to the local hard drive while debugging. Here are commands. Dim WriteLevel, WriteWay As TextWriter WriteLevel.Initialize(File.OpenOutput(File.DirDefaultExternal, fileName ,False)) Path for fileName was configured while running AVD manager to the original file. Compiler created a folder by the name "fileName.lock" and a file within by the name "pid" The first question is what means "mnt" in line mnt\sdcard\Android\data\... How to write a file to any folder in the local drive Thanks
Devv Active Member Licensed User Longtime User Jan 14, 2015 #2 why dont you use file write ? Code: File.WriteString(File.DirDefaultExternal,"test.txt","this is a test") Upvote 0
why dont you use file write ? Code: File.WriteString(File.DirDefaultExternal,"test.txt","this is a test")
S sarkis Member Licensed User Longtime User Jan 14, 2015 #3 Devv said: why dont you use file write ? Code: File.WriteString(File.DirDefaultExternal,"test.txt","this is a test") Click to expand... Commands working properly when I use regular sd card not a file in the local drive. Upvote 0
Devv said: why dont you use file write ? Code: File.WriteString(File.DirDefaultExternal,"test.txt","this is a test") Click to expand... Commands working properly when I use regular sd card not a file in the local drive.
DonManfred Expert Licensed User Longtime User Jan 15, 2015 #4 They also work properly if you use the right path. If you think it is not lik this then you should create a thread describing what you want to to, what you have done (your code (Export as zip)) and what errors you get Upvote 0
They also work properly if you use the right path. If you think it is not lik this then you should create a thread describing what you want to to, what you have done (your code (Export as zip)) and what errors you get
S sarkis Member Licensed User Longtime User Jan 15, 2015 #5 DonManfred said: They also work properly if you use the right path. If you think it is not lik this then you should create a thread describing what you want to to, what you have done (your code (Export as zip)) and what errors you get Click to expand... Well, If I use CD card everything is ok. Error appearing when I am trying to use file. I set a path from AVD manager. Here are commands. Dim WriteLevel As TextWriter WriteLevel.Initialize(File.OpenOutput(File.DirDefaultExternal, fileName ,False)) I get an error "file not found mnt\sdcard\Android\data\...fileName" Thanks Upvote 0
DonManfred said: They also work properly if you use the right path. If you think it is not lik this then you should create a thread describing what you want to to, what you have done (your code (Export as zip)) and what errors you get Click to expand... Well, If I use CD card everything is ok. Error appearing when I am trying to use file. I set a path from AVD manager. Here are commands. Dim WriteLevel As TextWriter WriteLevel.Initialize(File.OpenOutput(File.DirDefaultExternal, fileName ,False)) I get an error "file not found mnt\sdcard\Android\data\...fileName" Thanks
DonManfred Expert Licensed User Longtime User Jan 15, 2015 #6 What is the exacpt path and filename? Note that the files in the android\data\yourpackage\files\ are your ASSETS files (files-tab in the ide). This path is read only. You should use a writeable path to store files... File.DirRootExternal for ex. Upvote 0
What is the exacpt path and filename? Note that the files in the android\data\yourpackage\files\ are your ASSETS files (files-tab in the ide). This path is read only. You should use a writeable path to store files... File.DirRootExternal for ex.
S sarkis Member Licensed User Longtime User Jan 15, 2015 #7 DonManfred said: What is the exacpt path and filename? Note that the files in the android\data\yourpackage\files\ are your ASSETS files (files-tab in the ide). This path is read only. You should use a writeable path to store files... File.DirRootExternal for ex. Click to expand... I tried File.DirDefaultExternal but I dont know where to start . From C:\... or file\ Upvote 0
DonManfred said: What is the exacpt path and filename? Note that the files in the android\data\yourpackage\files\ are your ASSETS files (files-tab in the ide). This path is read only. You should use a writeable path to store files... File.DirRootExternal for ex. Click to expand... I tried File.DirDefaultExternal but I dont know where to start . From C:\... or file\
DonManfred Expert Licensed User Longtime User Jan 15, 2015 #8 You can not store a file in Windows fron your app Upvote 0
S sarkis Member Licensed User Longtime User Jan 15, 2015 #9 DonManfred said: You can not store a file in Windows fron your app Click to expand... I tried both DirDefaultExternal and DirRootExternal and every time i get the same error file not found with permission denied. And in both cases it was created folder by name filename.lock and a "pid" named file 1kb within. Anyway thank you for help Thanks Upvote 0
DonManfred said: You can not store a file in Windows fron your app Click to expand... I tried both DirDefaultExternal and DirRootExternal and every time i get the same error file not found with permission denied. And in both cases it was created folder by name filename.lock and a "pid" named file 1kb within. Anyway thank you for help Thanks
klaus Expert Licensed User Longtime User Jan 15, 2015 #10 sarkis said: And in both cases it was created folder by name filename.lock and a "pid" named file 1kb within. Click to expand... Where and how did you create the folder ? Upvote 0
sarkis said: And in both cases it was created folder by name filename.lock and a "pid" named file 1kb within. Click to expand... Where and how did you create the folder ?
S sarkis Member Licensed User Longtime User Jan 15, 2015 #11 The folders was crated by system ,not by me I only choose the path in AVD and run debugger with commands Dim WriteLevel As TextWriter WriteLevel.Initialize(File.OpenOutput(File.DirDefaultExternal, fileName ,False)) files was crated. Upvote 0
The folders was crated by system ,not by me I only choose the path in AVD and run debugger with commands Dim WriteLevel As TextWriter WriteLevel.Initialize(File.OpenOutput(File.DirDefaultExternal, fileName ,False)) files was crated.
klaus Expert Licensed User Longtime User Jan 15, 2015 #12 What exactly do you want to do with the information in this file during debuging? For debugging you have other possibilities like Breakpoints and the Log. These would be much more efficient than writing data in a file. Upvote 0
What exactly do you want to do with the information in this file during debuging? For debugging you have other possibilities like Breakpoints and the Log. These would be much more efficient than writing data in a file.
S sarkis Member Licensed User Longtime User Jan 15, 2015 #13 klaus said: What exactly do you want to do with the information in this file during debuging? For debugging you have other possibilities like Breakpoints and the Log. These would be much more efficient than writing data in a file. Click to expand... Thank you for responding That information I need to save for another application , not for a debugging purposes. Thank you again Upvote 0
klaus said: What exactly do you want to do with the information in this file during debuging? For debugging you have other possibilities like Breakpoints and the Log. These would be much more efficient than writing data in a file. Click to expand... Thank you for responding That information I need to save for another application , not for a debugging purposes. Thank you again
klaus Expert Licensed User Longtime User Jan 15, 2015 #14 From your first post: I am trying to write a txt file to the local hard drive while debugging. Click to expand... That's why I understood that is was for debugging. If I understood well, you use an Emulator. Did you set a size for the SDCard ? Beginner's Guide chpater 6.2 Create a new Emulator. Upvote 0
From your first post: I am trying to write a txt file to the local hard drive while debugging. Click to expand... That's why I understood that is was for debugging. If I understood well, you use an Emulator. Did you set a size for the SDCard ? Beginner's Guide chpater 6.2 Create a new Emulator.
S sarkis Member Licensed User Longtime User Jan 16, 2015 #15 klaus said: From your first post: That's why I understood that is was for debugging. If I understood well, you use an Emulator. Did you set a size for the SDCard ? Beginner's Guide chpater 6.2 Create a new Emulator. Click to expand... Yes I did. But now I am using phone connected with usb and it seems there is no problem ... till now. Upvote 0
klaus said: From your first post: That's why I understood that is was for debugging. If I understood well, you use an Emulator. Did you set a size for the SDCard ? Beginner's Guide chpater 6.2 Create a new Emulator. Click to expand... Yes I did. But now I am using phone connected with usb and it seems there is no problem ... till now.
S sarkis Member Licensed User Longtime User Jan 16, 2015 #16 klaus said: From your first post: That's why I understood that is was for debugging. If I understood well, you use an Emulator. Did you set a size for the SDCard ? Beginner's Guide chpater 6.2 Create a new Emulator. Click to expand... By the way I have a question Can you participate to the one of my project? Do you have time? Let me know. Here is my email. [email protected] Thanks Upvote 0
klaus said: From your first post: That's why I understood that is was for debugging. If I understood well, you use an Emulator. Did you set a size for the SDCard ? Beginner's Guide chpater 6.2 Create a new Emulator. Click to expand... By the way I have a question Can you participate to the one of my project? Do you have time? Let me know. Here is my email. [email protected] Thanks