MCPcopy Create free account
hub / github.com/VKCOM/nocc / MapServerAbsToClientFileName

Method MapServerAbsToClientFileName

internal/server/client.go:91–93  ·  view source on GitHub ↗

MapServerAbsToClientFileName converts an absolute path on server relatively to the client working dir. For example, /tmp/nocc/cpp/clients/{clientID}/proj/1.cpp maps to /proj/1.cpp. If serverFileName is /usr/local/include, it's left as is.

(serverFileName string)

Source from the content-addressed store, hash-verified

89// For example, /tmp/nocc/cpp/clients/{clientID}/proj/1.cpp maps to /proj/1.cpp.
90// If serverFileName is /usr/local/include, it's left as is.
91func (client *Client) MapServerAbsToClientFileName(serverFileName string) string {
92 return strings.TrimPrefix(serverFileName, client.workingDir)
93}
94
95func (client *Client) CreateNewSession(in *pb.StartCompilationSessionRequest) (*Session, error) {
96 newSession := &Session{

Callers 2

UploadFileStreamMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected