# getCacheDir (/zh-CN/api-reference/rtc/harmonyos/api-imediaplayercachemanager-getcachedir) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). ## 详情 [#详情] 如果你在调用该方法前未曾调用 [setCacheDir](/zh-CN/api-reference/rtc/harmonyos/api-imediaplayercachemanager-setcachedir) 方法自定义缓存文件的储存路径,该方法返回的为 SDK 默认的缓存文件储存路径。 ## 返回值 [#返回值] - < 0:方法调用失败,详见 [MediaPlayerReason](/zh-CN/api-reference/rtc/harmonyos/enum-mediaplayerreason)。