From 8218c2be210690dc079134ff7899cf6c05e281ef Mon Sep 17 00:00:00 2001 From: "zhangyafei.echo" Date: Thu, 14 Aug 2025 14:52:34 +0800 Subject: [PATCH] Description:context support log file dir. Sig:SIG_ApplicationFramework Feature or BugFix: Feature Binary Source: No Signed-off-by: zhangyafei.echo Change-Id: Ibdae0118b1c7b84a3d1d1b02ad6528d19dd2d6cd --- api/application/Context.d.ts | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/api/application/Context.d.ts b/api/application/Context.d.ts index b226b36719..819d9ae492 100644 --- a/api/application/Context.d.ts +++ b/api/application/Context.d.ts @@ -289,7 +289,7 @@ declare class Context extends BaseContext { */ /** * Bundle code directory. - * + * *

**NOTE**: *
Do not access resource files using concatenated paths. Use @ohos.resourceManager instead. *

@@ -324,7 +324,7 @@ declare class Context extends BaseContext { /** * Resource directory. - * + * *

**NOTE**: *
You are required to manually create the resfile directory in \resource. The resfile * directory can be accessed only in read-only mode. @@ -350,6 +350,18 @@ declare class Context extends BaseContext { */ cloudFileDir: string; + /** + * Log file directory. + * + * @type { string } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + get logFileDir(): string; + /** * Indicates event hub. * @@ -436,7 +448,7 @@ declare class Context extends BaseContext { /** * Creates the context based on the bundle name. - * + * *

**NOTE**: *
If there are multiple modules in the stage model, resource ID conflicts may occur. You are advised to * use application.createModuleContext instead. @@ -482,7 +494,7 @@ declare class Context extends BaseContext { */ /** * Creates the context based on the module name. - * + * *

**NOTE**: *
This API is deprecated since API version 12. You are advised to use application.createModuleContext instead. *

@@ -503,7 +515,7 @@ declare class Context extends BaseContext { /** * Creates the context based on the bundle name and module name. - * + * *

**NOTE**: *
This API is deprecated since API version 12. You are advised to use application.createModuleContext instead. *

-- Gitee