diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index ed62cf40293ae91ec6ccbeaefa601c04a514f874..171f80db271ea29b7bb531a3e1bbf51c20abdbec 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -294,6 +294,22 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbility(AbilityBase_Want * AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbilityWithStartOptions(AbilityBase_Want *want, AbilityRuntime_StartOptions *options); +/** + * @brief Obtain the log file directory of the application. + * + * @param buffer A pointer to a buffer that receives the log file directory of the application. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 21 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLogFileDir( + char* buffer, const int32_t bufferSize, int32_t* writeLength); #ifdef __cplusplus } // extern "C" #endif