MCPcopy Create free account
hub / github.com/Super-long/ChubbyGo / CheckToken

Method CheckToken

BaseServer/fileSystem.go:433–446  ·  view source on GitHub ↗
(token uint64, filename string)

Source from the content-addressed store, hash-verified

431}
432
433func (Fsn *FileSystemNode) CheckToken(token uint64, filename string) error{
434 Node, IsExist := Fsn.next[filename]
435
436 if !IsExist {
437 log.Printf("INFO : %s/%s does not exist.\n", Fsn.nowPath, filename)
438 return ChubbyGoFileSystemError(PathError)
439 }
440
441 if Node.tokenSeq == token{
442 return nil
443 } else {
444 return ChubbyGoFileSystemError(TokenSeqError)
445 }
446}
447
448/*
449 * @brief: Debug用,显示当前目录树的全部文件名

Callers

nothing calls this directly

Calls 1

ChubbyGoFileSystemErrorTypeAlias · 0.85

Tested by

no test coverage detected