通过api读取工程下的文件有当前有两种方式1.放在rawfile文件下通过getRawFileContent获取,https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-resource-manager-0000001815087730-V5\#ZH-CN\_TOPIC\_0000001815087730\_\_getrawfilecontent92.放在resfile目录下,通过getContext().resourceDir获取,https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/resource-categories-and-access-0000001774119914-V5\#ZH-CN\_TOPIC\_0000001860743937\_\_资源目录
通过api读取工程下的文件有当前有两种方式
1.放在rawfile文件下通过getRawFileContent获取,https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-resource-manager-0000001815087730-V5\#ZH-CN\_TOPIC\_0000001815087730\_\_getrawfilecontent9
2.放在resfile目录下,通过getContext().resourceDir获取,https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/resource-categories-and-access-0000001774119914-V5\#ZH-CN\_TOPIC\_0000001860743937\_\_资源目录