MCPcopy Create free account
hub / github.com/QuantumNous/new-api / ReadDiskCacheFileString

Function ReadDiskCacheFileString

common/disk_cache.go:93–99  ·  view source on GitHub ↗

ReadDiskCacheFileString 读取磁盘缓存文件为字符串

(filePath string)

Source from the content-addressed store, hash-verified

91
92// ReadDiskCacheFileString 读取磁盘缓存文件为字符串
93func ReadDiskCacheFileString(filePath string) (string, error) {
94 data, err := os.ReadFile(filePath)
95 if err != nil {
96 return "", err
97 }
98 return string(data), nil
99}
100
101// RemoveDiskCacheFile 删除磁盘缓存文件
102func RemoveDiskCacheFile(filePath string) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected