MCPcopy Create free account
hub / github.com/serverless/serverless / writeFile

Function writeFile

packages/util/src/rc/index.js:43–46  ·  view source on GitHub ↗
(filePath, contents)

Source from the content-addressed store, hash-verified

41 * @returns A promise that resolves when the file is written.
42 */
43const writeFile = async (filePath, contents) => {
44 await fsp.mkdir(path.dirname(filePath), { recursive: true })
45 await fsp.writeFile(filePath, contents, {})
46}
47
48/**
49 * Get .{baseFilename}rc configuration file name.

Callers 3

saveRcFileFunction · 0.70

Calls 1

writeFileMethod · 0.80

Tested by

no test coverage detected