getRelPath
约 64 字小于 1 分钟
2025-10-13
Karin API Docs / getRelPath
函数: getRelPath()
getRelPath(
filePath):string
定义于: packages/core/src/utils/fs/path.ts:81
参数
filePath
string
相对路径路径
返回
string
Description
去掉相对路径的前缀和后缀
示例
getRelPath('./plugins/karin-plugin-example/index.ts')
// -> 'plugins/karin-plugin-example/index.ts'