UseGetRelativePath
katanakit-js / useGetRelativePath
Function: useGetRelativePath()
Section titled “Function: useGetRelativePath()”function useGetRelativePath(from, to): Promise<string>;Defined in: infrastructure/filesystem/path.service.ts:115
Computes the relative path from from to to.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
from |
string |
Origin path. |
to |
string |
Destination path. |
Returns
Section titled “Returns”Promise<string>
The relative path between both.
Example
Section titled “Example”await useGetRelativePath("/app/src", "/app/data/books.json"); // "../data/books.json"