* @description 设置本次上传的根目录
(path: string)
| 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 返回本次上传的根目录 |
no outgoing calls
no test coverage detected