J
John A Grandy
Has anyone ever experienced creating a FileStream with no shared access ,
writing to the file , and then closing the FileStream , but there is a delay
in the lock being removed ?
So, code might be :
FileStream stream = File.Open( filePath, FileMode.Append, FileAccess.Write,
FileShare.None );
BinaryWriter writer = new BinaryWriter( writer_fs_datetime );
writer.WriteLine( "whatever" );
writer.Close();
// .... other stuff ....
// some other code attempts to read from or write to file but gets access
denied error
writing to the file , and then closing the FileStream , but there is a delay
in the lock being removed ?
So, code might be :
FileStream stream = File.Open( filePath, FileMode.Append, FileAccess.Write,
FileShare.None );
BinaryWriter writer = new BinaryWriter( writer_fs_datetime );
writer.WriteLine( "whatever" );
writer.Close();
// .... other stuff ....
// some other code attempts to read from or write to file but gets access
denied error