[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[DotGNU]System.IO.File.Delete() bugfix
From: |
Gopal V |
Subject: |
[DotGNU]System.IO.File.Delete() bugfix |
Date: |
Sun, 11 Aug 2002 14:46:19 +0530 |
User-agent: |
Mutt/1.2.5i |
If memory serves me right, BioChem333 wrote:
> Unfortunately, System.IO.File.Delete() isn't working (at least not for
> me), and System.IO.FileStream doesn't set the file size to 0 when in
> write-only mode.
First one is fixed .... a really silly bug ...
The second thing does not work the way you want it to ...
The ECMA document for File.OpenWrite is "Opens an existing file for writing,
This method is equivalent to FileStream(path,FileMode.OpenOrCreate,
FileAccess.Write,FileShare.None)"...
What you must use is
new FileStream(path,FileMode.Create,FileAccess.Write,FileShare.None);
Gopal
--
The difference between insanity and genius is measured by success
File.patch
Description: Text document
- [DotGNU]System.IO.File.Delete() bugfix,
Gopal V <=