mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-01-23 22:42:15 +08:00
add file recorder library
This commit is contained in:
parent
1208ccad08
commit
6e8ee94285
@ -35,6 +35,8 @@ func NewFileRecorder(filePath string) *FileRecorder {
|
||||
|
||||
// Append 增加数据记录
|
||||
func (f *FileRecorder) Append(item *FileRecordItem) error {
|
||||
f.locker.Lock()
|
||||
defer f.locker.Unlock()
|
||||
savePath := f.Path
|
||||
folder := filepath.Dir(savePath)
|
||||
if b, err := utils.PathExists(folder); err == nil && !b {
|
||||
|
Loading…
Reference in New Issue
Block a user