Skip to content

Commit b3fe8af

Browse files
committed
docs(Foundation.Extensions): 完善 DirectoryExtensions 的 XML 注释文档
将主要注释翻译为英文并完善说明,以提供更好的多语言支持。
1 parent bc0b86f commit b3fe8af

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

GameFrameX.Foundation.Extensions/DirectoryExtensions.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,26 @@
3434
namespace GameFrameX.Foundation.Extensions;
3535

3636
/// <summary>
37-
/// 目录扩展方法
37+
/// 目录扩展方法
3838
/// </summary>
39+
/// <remarks>
40+
/// Provides extension methods for directory operations.
41+
/// </remarks>
3942
public static class DirectoryExtensions
4043
{
4144
/// <summary>
4245
/// 根据路径创建目录,支持递归创建。
4346
/// </summary>
44-
/// <param name="path">目录路径。</param>
45-
/// <param name="isFile">是否为文件路径,如果为true,则创建文件所在的目录。默认为false。</param>
46-
/// <exception cref="ArgumentNullException">当path为null时抛出。</exception>
4747
/// <remarks>
48-
/// 此方法使用 <see cref="Directory.CreateDirectory"/> 实现,该方法会自动递归创建所有必要的父目录。
49-
/// 当isFile为true时,会自动获取文件所在目录路径。
50-
/// 支持相对路径和绝对路径。
51-
/// 如果目录已存在,则不会进行任何操作。
48+
/// Creates a directory based on the path, supporting recursive creation.
49+
/// This method uses <see cref="Directory.CreateDirectory(string)"/> which automatically creates all necessary parent directories recursively.
50+
/// When isFile is true, it automatically gets the directory path where the file is located.
51+
/// Supports both relative and absolute paths.
52+
/// If the directory already exists, no operation is performed.
5253
/// </remarks>
54+
/// <param name="path">目录路径 / The directory path.</param>
55+
/// <param name="isFile">是否为文件路径,如果为 <c>true</c>,则创建文件所在的目录,默认为 <c>false</c> / Whether it is a file path, if <c>true</c>, creates the directory where the file is located, defaults to <c>false</c>.</param>
56+
/// <exception cref="ArgumentNullException">当 <paramref name="path"/> 为 <c>null</c> 时抛出 / Thrown when <paramref name="path"/> is <c>null</c>.</exception>
5357
public static void CreateAsDirectory(this string path, bool isFile = false)
5458
{
5559
ArgumentNullException.ThrowIfNull(path, nameof(path));

0 commit comments

Comments
 (0)