mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
upd(utils/path): resolve 方法增加默认当前目录
This commit is contained in:
@@ -5,9 +5,12 @@ export const {
|
||||
extname,
|
||||
dirname,
|
||||
join,
|
||||
resolve,
|
||||
} = Path
|
||||
|
||||
export function resolve (...args: string[]) {
|
||||
return Path.resolve('/', ...args)
|
||||
}
|
||||
|
||||
export function relative (from: string, to: string) {
|
||||
return Path.relative(
|
||||
from.startsWith('/') ? from : ('/' + from),
|
||||
|
||||
Reference in New Issue
Block a user