Discussion:
System.IO.File.Open() のバグ?
(too old to reply)
Masato
2005-01-17 08:07:11 UTC
Permalink
$B$*Hh$lMM$G$9!#(B

using System.IO;

namespace test
{
class Class
{
static void Main(string[] args)
{
string wrkPath = @"c:\test";

//# c:\$B$K(Btest$B%U%)%k%@$r:n$k(B
Directory.CreateDirectory(wrkPath);

//# $B%U%!%$%k!V(Bc:\test$B!W$r:n$k(B
FileStream fs = File.Open(wrkPath,FileMode.Append);
StreamWriter sw = new StreamWriter(fs);

sw.WriteLine("hoge");

sw.Close();
fs.Close();

}
}
}

$B$3$N%3!<%I$G%(%i!<!!(BSystem.UnauthorizedAccessException$B!!$,H/@8$7$^$9!#(B
$B$D$^$j!"%G%#%l%/%H%j%Q%9$H$7$FB8:_$7$F$$$k%Q%9$r!"%U%!%$%k%Q%9$H$7$F07$*$&$H$7$?$H$-$KH/@8$9$k$h$&$G$9!#(B
$B2sHrJ}K!$J$I$"$j$^$9$G$7$g$&$+!)(B

Masato.
Masato
2005-01-17 08:45:51 UTC
Permalink
$***@5>oF0:n$G$9$M!#!#$9$^$;$s!#(B

Loading...