Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/directus/directus
/ pathToRelativeUrl
Function
pathToRelativeUrl
packages/utils/node/path-to-relative-url.ts:3–5 ·
view source on GitHub ↗
(filePath: string, root = '.')
Source
from the content-addressed store, hash-verified
1
import
path from
'path'
;
2
3
export
function
pathToRelativeUrl(filePath: string, root =
'.'
): string {
4
return
path.relative(root, filePath).split(path.sep).join(path.posix.sep);
5
}
Callers
8
add
Function · 0.90
toConvertSourceUrl
Function · 0.90
generateBundleEntrypoint
Function · 0.90
loadConfig
Function · 0.90
generateExtensionsEntrypoint
Function · 0.90
importFileUrl
Function · 0.90
initializeWatcher
Method · 0.90
path-to-relative-url.test.ts
File · 0.85
Calls
1
join
Method · 0.80
Tested by
no test coverage detected