MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / ensurePathExists

Function ensurePathExists

emain/emain-platform.ts:94–99  ·  view source on GitHub ↗

* Ensure the given path exists, creating it recursively if it doesn't. * @param path The path to ensure. * @returns The same path, for chaining.

(path: string)

Source from the content-addressed store, hash-verified

92 * @returns The same path, for chaining.
93 */
94function ensurePathExists(path: string): string {
95 if (!existsSync(path)) {
96 mkdirSync(path, { recursive: true });
97 }
98 return path;
99}
100
101/**
102 * Gets the path to the directory where Wave configurations are stored. Creates the directory if it does not exist.

Callers 2

getWaveConfigDirFunction · 0.85
getWaveDataDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected