From 80c0c28ed76576ae36d25caaff754f6c36a4cef2 Mon Sep 17 00:00:00 2001 From: VictoriaGuo Date: Thu, 23 Dec 2021 15:27:08 +0800 Subject: [PATCH] add getRawFile interface Signed-off-by: VictoriaGuo --- api/@ohos.resourceManager.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/@ohos.resourceManager.d.ts b/api/@ohos.resourceManager.d.ts index 3a852691bb..bbe14d1aae 100644 --- a/api/@ohos.resourceManager.d.ts +++ b/api/@ohos.resourceManager.d.ts @@ -351,6 +351,24 @@ export interface ResourceManager { * @since 6 */ getPluralString(resId: number, num: number): Promise; + + /** + * Obtains the raw file resource corresponding to the specified resource path in callback mode. + * + * @param path Indicates the resource relative path. + * @param callback Indicates the asynchronous callback used to return the raw file resource. + * @since 8 + */ + getRawFile(path: string, callback: AsyncCallback); + + /** + * Obtains the raw file resource corresponding to the specified resource path in Promise mode. + * + * @param path Indicates the resource relative path. + * @return Returns the raw file resource corresponding to the specified resource path. + * @since 8 + */ + getRawFile(path: string): Promise; } } export default resmgr; \ No newline at end of file -- Gitee