MCPcopy Create free account
hub / github.com/MertJSX/folderhost / ChangePath

Function ChangePath

utils/web_socket_clients.go:125–139  ·  view source on GitHub ↗
(clientConn *websocket.Conn, path string, isDir bool)

Source from the content-addressed store, hash-verified

123}
124
125func ChangePath(clientConn *websocket.Conn, path string, isDir bool) error {
126 clientsMu.RLock()
127 defer clientsMu.RUnlock()
128
129 for conn, clientInfo := range clients {
130 if conn == clientConn {
131 clientInfo.Path = path
132 clientInfo.IsDirectory = isDir
133 clients[clientConn] = clientInfo
134 return nil
135 }
136 }
137
138 return fmt.Errorf("client not found")
139}

Callers 1

processWebSocketMessageFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected