UseGetCwd
katanakit-js / useGetCwd
Function: useGetCwd()
Section titled “Function: useGetCwd()”function useGetCwd(): string | null;Defined in: infrastructure/filesystem/path.service.ts:167
Returns the current working directory of the process (where the
command was launched), or null outside a Node-compatible runtime.
Use it for project-relative paths; use useGetDirname for
file-relative paths.
Returns
Section titled “Returns”string | null
The cwd, or null in browsers/edge runtimes.
Example
Section titled “Example”const cwd = useGetCwd(); // "/app" when launched from the project root