Skip to main content

writeFile

client.environments.writeFile(id: string, data: WriteEnvironmentFileRequest): Promise<unknown>

Writes a file to an environment's filesystem.

Creates or overwrites a file at the specified path within the environment. Useful for deploying configuration or code changes.

Parameters​

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the environment
dataWriteEnvironmentFileRequestYesThe file write request specifying path and content

Returns​

Promise<unknown> — A promise that resolves when the file has been written

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.environments.writeFile('id', /* WriteEnvironmentFileRequest */);
console.log(result);