You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -20,6 +52,22 @@ public static T[] ReadAll<T>(string path)
20
52
returnreader.ReadAll<T>();
21
53
}
22
54
55
+
/// <summary>
56
+
/// <para>Reads and returns the first <typeparamref name="T"/> structure value from the file at the <paramref name="path"/>.</para>
57
+
/// <para>Считывает и возвращает первое значение структуры типа <typeparamref name="T"/> из файла находящегося в <paramref name="path"/>.</para>
58
+
/// </summary>
59
+
/// <typeparam name="T">
60
+
/// <para>The structure type.</para>
61
+
/// <para>Тип структуры.</para>
62
+
/// </typeparam>
63
+
/// <param name="path">
64
+
/// <para>The path to the file, from which to read the <typeparamref name="T"/> structure value.</para>
65
+
/// <para>Путь к файлу, из которого нужно прочитать значение структуры типа <typeparamref name="T"/>.</para>
66
+
/// </param>
67
+
/// <returns>
68
+
/// <para>The <typeparamref name="T"/> structure value if read from the file at the <paramref name="path"/> is successful; otherwise the default <typeparamref name="T"/> structure value.</para>
69
+
/// <para>Значение структуры типа <typeparamref name="T"/> если чтение из файла находящегося в <paramref name="path"/> прошло успешно, иначе значение структуры типа <typeparamref name="T"/> по умолчанию.</para>
@@ -28,9 +76,49 @@ public static T ReadFirstOrDefault<T>(string path)
28
76
returnfileStream?.ReadOrDefault<T>()??default;
29
77
}
30
78
79
+
/// <summary>
80
+
/// <para>Returns the <see cref="FileStream"/> opened for reading from the file at the <paramref name="path"/> if the file exists, not empty and its size is a multiple of the <typeparamref name="TStruct"/> structure size; otherwise <see langword="null"/>.</para>
81
+
/// <para>Возвращает <see cref="FileStream"/> открытый для чтения из файла находящегося в <paramref name="path"/>, если файл существует, не пуст и его размер кратен размеру структуры типа <typeparamref name="TStruct"/>, а иначе <see langword="null"/>.</para>
82
+
/// </summary>
83
+
/// <typeparam name="TStruct">
84
+
/// <para>The structure type.</para>
85
+
/// <para>Тип структуры.</para>
86
+
/// </typeparam>
87
+
/// <param name="path">
88
+
/// <para>The path to the file to validate.</para>
89
+
/// <para>Путь к проверяемому файлу.</para>
90
+
/// </param>
91
+
/// <returns>
92
+
/// <para>A <see cref="FileStream"/> opened for reading in the case of successful check; otherwise <see langword="null"/>.</para>
93
+
/// <para><see cref="FileStream"/> открытый для чтения в случае успешной проверки, а иначе <see langword="null"/>.</para>
94
+
/// </returns>
95
+
/// <exception cref="InvalidOperationException">
96
+
/// <para>The size of the file at the <paramref name="path"/> is not a multiple of the required <paramref name="elementSize"/>.</para>
97
+
/// <para>Размер файла находящегося в <paramref name="path"/> не кратен требуемому <paramref name="elementSize"/>.</para>
/// <para>Returns the <see cref="FileStream"/> opened for reading from the file at the <paramref name="path"/> if the file exists, not empty and its size is a multiple of the required <paramref name="elementSize"/>; otherwise <see langword="null"/>.</para>
104
+
/// <para>Возвращает <see cref="FileStream"/> открытый для чтения из файла находящегося в <paramref name="path"/>, если файл существует, не пуст и его размер кратен <paramref name="elementSize"/>, а иначе <see langword="null"/>.</para>
105
+
/// </summary>
106
+
/// <param name="path">
107
+
/// <para>The path to the file to validate.</para>
108
+
/// <para>Путь к проверяемому файлу.</para>
109
+
/// </param>
110
+
/// <param name="elementSize">
111
+
/// <para>Required size of elements located in the file at the <paramref name="path"/>.</para>
112
+
/// <para>Требуемый размер элементов, находящихся в файле находящегося в <paramref name="path"/>.</para>
113
+
/// </param>
114
+
/// <returns>
115
+
/// <para>A <see cref="FileStream"/> opened for reading in the case of successful check; otherwise <see langword="null"/>.</para>
116
+
/// <para><see cref="FileStream"/> открытый для чтения в случае успешной проверки, а иначе <see langword="null"/>.</para>
117
+
/// </returns>
118
+
/// <exception cref="InvalidOperationException">
119
+
/// <para>The size of the file at the <paramref name="path"/> is not a multiple of the required <paramref name="elementSize"/>.</para>
120
+
/// <para>Размер файла находящегося в <paramref name="path"/> не кратен требуемому <paramref name="elementSize"/>.</para>
/// <para>Reads and returns the last <typeparamref name="T"/> structure value from the file at the <paramref name="path"/>.</para>
139
+
/// <para>Считывает и возвращает последнее значение структуры типа <typeparamref name="T"/> из файла находящегося в <paramref name="path"/>.</para>
140
+
/// </summary>
141
+
/// <typeparam name="T">
142
+
/// <para>The structure type.</para>
143
+
/// <para>Тип структуры.</para>
144
+
/// </typeparam>
145
+
/// <param name="path">
146
+
/// <para>The path to the <typeparamref name="T"/> structure values.</para>
147
+
/// <para>Путь к файлу с значениями структур типа <typeparamref name="T"/>.</para>
148
+
/// </param>
149
+
/// <returns>
150
+
/// <para>The <typeparamref name="T"/> structure value from the file at the <paramref name="path"/> in the case of successful read; otherwise the default <typeparamref name="T"/> structure value.</para>
151
+
/// <para>Значение структуры типа <typeparamref name="T"/> из файла находящегося в <paramref name="path"/> в случае успешного чтения, иначе значение по умолчанию структуры типа <typeparamref name="T"/>.</para>
@@ -70,12 +190,48 @@ public static void WriteFirst<T>(string path, T value)
70
190
writer.Write(value);
71
191
}
72
192
193
+
/// <summary>
194
+
/// <para>Opens or creates the file at the <paramref name="path"/> and returns its <see cref="FileStream"/> with append mode and write access.</para>
195
+
/// <para>Открывает или создает файл находящегося в <paramref name="path"/> и возвращает его <see cref="FileStream"/> с режимом дополнения и доступом на запись.</para>
196
+
/// </summary>
197
+
/// <param name="path">
198
+
/// <para>The path to the file to open or create.</para>
199
+
/// <para>Путь к файлу, который нужно открыть или создать.</para>
200
+
/// </param>
201
+
/// <returns>
202
+
/// <para>The <see cref="FileStream"/> with append mode and write access.</para>
203
+
/// <para><see cref="FileStream"/> с режимом дополнения и доступом на запись.</para>
/// <para>Removes files from the directory at the path <paramref name="directory"/> according to the <paramref name="searchPattern"/> and the <paramref name="searchOption"/>.</para>
273
+
/// <para>Удаляет файлы из директории находящейся по пути <paramref name="directory"/> в соотвествии с <paramref name="searchPattern"/> и <paramref name="searchOption"/>.</para>
274
+
/// </summary>
275
+
/// <param name="directory">
276
+
/// <para>The path to the directory to be cleaned.</para>
277
+
/// <para>Путь к директории для очистки.</para>
278
+
/// </param>
279
+
/// <param name="searchPattern">
280
+
/// <para>A search pattern for files to be deleted in the directory at the path <paramref name="directory"/>.</para>
281
+
/// <para>Шаблон поиска для удаляемых файлов в директории находящейся по пути <paramref name="directory"/> .</para>
282
+
/// </param>
283
+
/// <param name="searchOption">
284
+
/// <para>A <see cref="SearchOption"/> value that determines whether to search only in the current the directory at the path <paramref name="directory"/>, or also in all subdirectories.</para>
285
+
/// <para>Значение <see cref="SearchOption"/> определяющее искать ли только в текущей директории находящейся по пути <paramref name="directory"/>, или также во всех субдиректориях.</para>
0 commit comments