MCPcopy Create free account
hub / github.com/e2wugui/zeze / openFile

Method openFile

ZezeJava/ZezeJava/src/main/java/Zeze/Hot/HotAgent.java:76–86  ·  view source on GitHub ↗
(String fileName)

Source from the content-addressed store, hash-verified

74 }
75
76 public long openFile(String fileName) {
77 var hotManager = connector.TryGetReadySocket();
78 var r = new OpenFile();
79 r.Argument.setFileName(fileName);
80 r.SendForWait(hotManager).await();
81 if (r.getResultCode() != 0)
82 throw new RuntimeException("open file error. " + IModule.getErrorCode(r.getResultCode()));
83
84 // 更多返回结果,修改 BOpenFileResult 并修改返回值。
85 return r.Result.getOffset();
86 }
87
88 public void appendFile(String fileName, long offset, byte[] data) {
89 appendFile(fileName, offset, data, 0, data.length);

Callers 1

distributeMethod · 0.95

Calls 7

getErrorCodeMethod · 0.95
awaitMethod · 0.65
getOffsetMethod · 0.65
TryGetReadySocketMethod · 0.45
setFileNameMethod · 0.45
SendForWaitMethod · 0.45
getResultCodeMethod · 0.45

Tested by

no test coverage detected