for(;;)
{
if ((File.GetAttributes(@"c:\aciftp.txt") & FileAttributes.ReadOnly) != FileAttributes.ReadOnly)
{
FileStream fs = new FileStream(@"c:\aciftp.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.BaseStream.Seek(0, SeekOrigin.End);
sw.WriteLine(contents);
sw.WriteLine(DateTime.Now);
//MessageBox.Show(contents);
sw.Flush();
sw.Close();
break;
}
}
|