From 5383954f64d289b9fafd1e8e199737d39fe72783 Mon Sep 17 00:00:00 2001 From: Caido Bot Date: Thu, 25 Sep 2025 19:20:38 +0000 Subject: [PATCH] Update SDK Documentation --- src/reference/modules/llrt/fs/fs/promises.md | 32 ++++++++++++++++++++ src/reference/modules/llrt/fs/index.md | 22 ++++++++++++++ src/reference/sdks/backend/index.md | 8 +++++ src/reference/sdks/workflow/index.md | 8 +++++ 4 files changed, 70 insertions(+) diff --git a/src/reference/modules/llrt/fs/fs/promises.md b/src/reference/modules/llrt/fs/fs/promises.md index 0dac1c6..9117871 100644 --- a/src/reference/modules/llrt/fs/fs/promises.md +++ b/src/reference/modules/llrt/fs/fs/promises.md @@ -804,6 +804,38 @@ Asynchronously reads the entire contents of a file. *** +### rename() + +> **rename**(`oldPath`: `string`, `newPath`: `string`): `Promise`\<`void`\> + +Asynchronously renames a file or directory from `oldPath` to `newPath`. + +```js +import { rename } from 'fs/promises'; + +try { + await rename('oldfile.txt', 'newfile.txt'); + console.log('Rename complete!'); +} catch (err) { + console.error(err); +} +``` + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `oldPath` | `string` | A path to a file or directory. | +| `newPath` | `string` | The new path for the file or directory. | + +#### Returns + +`Promise`\<`void`\> + +Fulfills with `undefined` upon success. + +*** + ### rm() > **rm**(`path`: `string`, `options`?: [`RmOptions`](../index.md#rmoptions)): `Promise`\<`void`\> diff --git a/src/reference/modules/llrt/fs/index.md b/src/reference/modules/llrt/fs/index.md index 1abe837..30af947 100644 --- a/src/reference/modules/llrt/fs/index.md +++ b/src/reference/modules/llrt/fs/index.md @@ -860,6 +860,28 @@ Synchronously reads the entire contents of a file. *** +### renameSync() + +> **renameSync**(`oldPath`: `string`, `newPath`: `string`): `void` + +Synchronously renames a file or directory from `oldPath` to `newPath`. + +For detailed information, see the documentation of the asynchronous version of +this API: [promises.rename](fs/promises.md#rename). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `oldPath` | `string` | +| `newPath` | `string` | + +#### Returns + +`void` + +*** + ### rmdirSync() > **rmdirSync**(`path`: `string`, `options`?: [`RmDirOptions`](index.md#rmdiroptions)): `void` diff --git a/src/reference/sdks/backend/index.md b/src/reference/sdks/backend/index.md index a7bada2..6239c40 100644 --- a/src/reference/sdks/backend/index.md +++ b/src/reference/sdks/backend/index.md @@ -2123,6 +2123,14 @@ The name of the project. `string` +##### getPath() + +The directory where the project is located. + +###### Returns + +`string` + ##### getStatus() The status of the project. diff --git a/src/reference/sdks/workflow/index.md b/src/reference/sdks/workflow/index.md index 6f17110..d866f4e 100644 --- a/src/reference/sdks/workflow/index.md +++ b/src/reference/sdks/workflow/index.md @@ -1975,6 +1975,14 @@ The name of the project. `string` +##### getPath() + +The directory where the project is located. + +###### Returns + +`string` + ##### getStatus() The status of the project.