Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/reference/modules/llrt/fs/fs/promises.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`\>
Expand Down
22 changes: 22 additions & 0 deletions src/reference/modules/llrt/fs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
8 changes: 8 additions & 0 deletions src/reference/sdks/backend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions src/reference/sdks/workflow/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading