MCPcopy
hub / github.com/EutropicAI/Final2x / setRootPath

Method setRootPath

src/renderer/src/utils/pathFormat.ts:11–17  ·  view source on GitHub ↗

* @description 设置本次上传的根目录

(path: string)

Source from the content-addressed store, hash-verified

9 * @description 设置本次上传的根目录
10 */
11 setRootPath(path: string): void {
12 const segments = path.split(/[/\\]/)
13 if (segments.length > 1) {
14 segments.pop()
15 this.rootpath = segments.join(path.startsWith('/') ? '/' : '\\')
16 }
17 }
18
19 /**
20 * @description 返回本次上传的根目录

Callers 2

getOutPutPATHFunction · 0.95
pathFormat.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected