Changeset 9841
- Timestamp:
- 08/02/13 15:28:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/Path Views/TextFileView.cs
r9833 r9841 216 216 if (!File.Exists(path)) return null; 217 217 string fileContent = string.Empty; 218 using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read )) {218 using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { 219 219 using (StreamReader streamReader = new StreamReader(fileStream)) { 220 220 fileContent = streamReader.ReadToEnd(); … … 225 225 226 226 private static void WriteFile(string path, string fileContent) { 227 using (FileStream fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare. Write)) {227 using (FileStream fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None)) { 228 228 using (StreamWriter streamWriter = new StreamWriter(fileStream)) { 229 229 streamWriter.Write(fileContent);
Note: See TracChangeset
for help on using the changeset viewer.