|
| Make file writeable |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.dotnet.languages.vb.
| James Kilner |
| GOOD ANSWER |
I am doing file access work and would like to be able to programmatically make the file writeable. At the moment when I try to write to a Read-Only file I get an error so I would like to be able to make the file writeable and still open the file. I am using the command Open "my file.txt" For Input As filenumber
Can anyone help please. J.
|
|
|
| |
|
|
| |
| | |
| |
| Adam Ward |
| GOOD ANSWER |
Hi You will need a byte array with the contents that you want to write to the file but this should do the trick
Imports System.IO
Dim fs As FileStream fs = File.Open("c:\demo\demo.txt", FileMode.Open) fs.Write(YourByteArray, ArrayIndexToStartFrom, MaxNumberOfBytesToWrite) fs.Close()
Cheers Adam
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
|
|
|
| |
|
|
| |
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|