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

Method resolveDeletePath

sdk/auth/filestore.go:213–222  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

211}
212
213func (s *FileTokenStore) resolveDeletePath(id string) (string, error) {
214 if strings.ContainsRune(id, os.PathSeparator) || filepath.IsAbs(id) {
215 return id, nil
216 }
217 dir := s.baseDirSnapshot()
218 if dir == "" {
219 return "", fmt.Errorf("auth filestore: directory not configured")
220 }
221 return filepath.Join(dir, id), nil
222}
223
224func (s *FileTokenStore) readAuthFiles(path, baseDir string) ([]*cliproxyauth.Auth, error) {
225 data, err := os.ReadFile(path)

Callers 1

DeleteMethod · 0.95

Calls 1

baseDirSnapshotMethod · 0.95

Tested by

no test coverage detected