Skip to content

Commit e43e05f

Browse files
authored
Update SDK Documentation (#73)
1 parent 1874783 commit e43e05f

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

src/reference/modules/llrt/fs/fs/promises.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,38 @@ Asynchronously reads the entire contents of a file.
804804
805805
***
806806
807+
### rename()
808+
809+
> **rename**(`oldPath`: `string`, `newPath`: `string`): `Promise`\<`void`\>
810+
811+
Asynchronously renames a file or directory from `oldPath` to `newPath`.
812+
813+
```js
814+
import { rename } from 'fs/promises';
815+
816+
try {
817+
await rename('oldfile.txt', 'newfile.txt');
818+
console.log('Rename complete!');
819+
} catch (err) {
820+
console.error(err);
821+
}
822+
```
823+
824+
#### Parameters
825+
826+
| Parameter | Type | Description |
827+
| ------ | ------ | ------ |
828+
| `oldPath` | `string` | A path to a file or directory. |
829+
| `newPath` | `string` | The new path for the file or directory. |
830+
831+
#### Returns
832+
833+
`Promise`\<`void`\>
834+
835+
Fulfills with `undefined` upon success.
836+
837+
***
838+
807839
### rm()
808840
809841
> **rm**(`path`: `string`, `options`?: [`RmOptions`](../index.md#rmoptions)): `Promise`\<`void`\>

src/reference/modules/llrt/fs/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,28 @@ Synchronously reads the entire contents of a file.
860860

861861
***
862862

863+
### renameSync()
864+
865+
> **renameSync**(`oldPath`: `string`, `newPath`: `string`): `void`
866+
867+
Synchronously renames a file or directory from `oldPath` to `newPath`.
868+
869+
For detailed information, see the documentation of the asynchronous version of
870+
this API: [promises.rename](fs/promises.md#rename).
871+
872+
#### Parameters
873+
874+
| Parameter | Type |
875+
| ------ | ------ |
876+
| `oldPath` | `string` |
877+
| `newPath` | `string` |
878+
879+
#### Returns
880+
881+
`void`
882+
883+
***
884+
863885
### rmdirSync()
864886

865887
> **rmdirSync**(`path`: `string`, `options`?: [`RmDirOptions`](index.md#rmdiroptions)): `void`

src/reference/sdks/backend/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,14 @@ The name of the project.
21232123

21242124
`string`
21252125

2126+
##### getPath()
2127+
2128+
The directory where the project is located.
2129+
2130+
###### Returns
2131+
2132+
`string`
2133+
21262134
##### getStatus()
21272135

21282136
The status of the project.

src/reference/sdks/workflow/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,6 +1975,14 @@ The name of the project.
19751975

19761976
`string`
19771977

1978+
##### getPath()
1979+
1980+
The directory where the project is located.
1981+
1982+
###### Returns
1983+
1984+
`string`
1985+
19781986
##### getStatus()
19791987

19801988
The status of the project.

0 commit comments

Comments
 (0)