MCPcopy Create free account
hub / github.com/TruthHun/BookStack / IsObjectExist

Method IsObjectExist

models/store/local.go:19–22  ·  view source on GitHub ↗

判断文件对象是否存在 @param object 文件对象 @return err 错误,nil表示文件存在,否则表示文件不存在,并告知错误信息

(object string)

Source from the content-addressed store, hash-verified

17//@param object 文件对象
18//@return err 错误,nil表示文件存在,否则表示文件不存在,并告知错误信息
19func (this *Local) IsObjectExist(object string) (err error) {
20 _, err = os.Stat(object)
21 return
22}
23
24//文件存储[如果是图片文件,不要使用gzip压缩,否则在使用阿里云OSS自带的图片处理功能无法处理图片]
25//@param tmpfile 临时文件

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected