mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-03 23:20:25 +08:00
21 lines
475 B
Go
21 lines
475 B
Go
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
|
|
|
|
package bfs
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
)
|
|
|
|
var ErrClosed = errors.New("the file closed")
|
|
var ErrInvalidHash = errors.New("invalid hash")
|
|
var ErrFileIsWriting = errors.New("the file is writing")
|
|
|
|
func IsWritingErr(err error) bool {
|
|
return err != nil && errors.Is(err, ErrFileIsWriting)
|
|
}
|
|
|
|
func IsNotExist(err error) bool {
|
|
return err != nil && os.IsNotExist(err)
|
|
}
|