MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ensureEmptyFile

Function ensureEmptyFile

internal/store/gitstore.go:960–968  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

958}
959
960func ensureEmptyFile(path string) error {
961 if _, err := os.Stat(path); err != nil {
962 if errors.Is(err, fs.ErrNotExist) {
963 return os.WriteFile(path, []byte{}, 0o600)
964 }
965 return err
966 }
967 return nil
968}
969
970func jsonEqual(a, b []byte) bool {
971 var objA any

Callers 1

EnsureRepositoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected