MCPcopy
hub / github.com/wavetermdev/waveterm / computeDirPart

Function computeDirPart

pkg/wshrpc/wshremote/wshremote_file.go:328–335  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

326}
327
328func computeDirPart(path string) string {
329 path = filepath.Clean(wavebase.ExpandHomeDirSafe(path))
330 path = filepath.ToSlash(path)
331 if path == "/" {
332 return "/"
333 }
334 return filepath.Dir(path)
335}
336
337func (*ServerImpl) fileInfoInternal(path string, extended bool) (*wshrpc.FileInfo, error) {
338 cleanedPath := filepath.Clean(wavebase.ExpandHomeDirSafe(path))

Callers 4

statToFileInfoFunction · 0.85
fileInfoInternalMethod · 0.85

Calls 2

ExpandHomeDirSafeFunction · 0.92
CleanMethod · 0.45

Tested by

no test coverage detected