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

Method Open

BaseServer/fileSystem.go:392–397  ·  view source on GitHub ↗

* * @param: 文件描述符传来的InstanceSeq;要打开的文件名 * @return: 返回当前文件的instanceSeq * @notes: 对于一个文件来说客户端open操作可以检查某个文件是否存在,如果存在会返回一个句柄,反之返回false; 对于一个目录来说open可以使其获取句柄后创建文件; */

(name string)

Source from the content-addressed store, hash-verified

390 对于一个目录来说open可以使其获取句柄后创建文件;
391*/
392func (Fsn *FileSystemNode) Open(name string) (uint64, uint64) {
393 // TODO 这里应该做一些权限的检测,但是现在并没有想好如何划分权限
394
395 // Open返回的应该是本文件的instanceSeq
396 return Fsn.instanceSeq, Fsn.checksum
397}
398
399/*
400 * @brief: 用于初始化每个Cell内的根目录

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected