Skip to content

Commit 115883d

Browse files
committed
add example and explaination
1 parent ae58639 commit 115883d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+357
-43
lines changed

docs/api/docutils/pdf_to_text.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: pdf_to_text.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Working Progress...

docs/api/fs/createFile.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,23 @@ data:
2525
link: createFile.md
2626
---
2727
<CBBaseInfo/>
28-
<CBParameters/>
28+
<CBParameters/>
29+
30+
### Example
31+
32+
```js
33+
// Let's assume you want to create a text file named hello.txt in the /home/user/documents directory with the content "Hello, world!"
34+
35+
codebolt.fs.createFile('hello.txt', 'Hello, world!', '/home/user/documents');
36+
37+
```
38+
39+
### Explaination
40+
41+
The codebolt.fs.createFile method is used to create a new file in a specified directory, with content provided as a string. It has three parameters:
42+
43+
fileName (string): This parameter specifies the name of the file to be created. The name should include the file extension (e.g., "example.txt", "data.json").
44+
45+
source (string): This parameter contains the content that will be written into the newly created file. It can be any string data that you want to save in the file.
46+
47+
filePath (string): This parameter defines the path where the file will be created. It should be a valid path in the filesystem where you have write permissions.

docs/api/fs/createFolder.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ data:
2222
link: createFolder.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
```js
30+
31+
//Let's assume you want to create a folder named newFolder in the /home/user/documents directory.
32+
33+
codebolt.fs.createFolder('newFolder', '/home/user/documents');
34+
35+
```
36+
37+
### Explaination
38+
39+
The codebolt.fs.createFolder method is used to create a new folder in a specified directory. It has two parameters:
40+
41+
folderName (string): The name of the folder to be created.
42+
43+
folderPath (string): The path where the folder will be created.

docs/api/fs/deleteFile.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ data:
2222
link: deleteFile.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
The codebolt.fs.deleteFile method is used to delete a specified file from a given directory. It has two parameters:
30+
31+
filename (string): The name of the file to be deleted, including the file extension (e.g., "example.txt", "data.json").
32+
33+
filePath (string): The path to the directory where the file is located.

docs/api/fs/deleteFolder.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ data:
2222
link: deleteFolder.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
```js
30+
//Let's assume you want to delete a folder named oldFolder in the /home/user/documents directory.
31+
32+
codebolt.fs.deleteFolder('oldFolder', '/home/user/documents');
33+
34+
```
35+
36+
37+
### Explaination
38+
39+
The codebolt.fs.deleteFolder method is used to delete a specified folder from a given directory. It has two parameters:
40+
41+
foldername (string): The name of the folder to be deleted.
42+
43+
folderpath (string): The path to the directory where the folder is located.

docs/api/fs/listFile.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ data:
1717
link: listFile.md
1818
---
1919
<CBBaseInfo/>
20-
<CBParameters/>
20+
<CBParameters/>
21+
22+
### Status
23+
24+
Working Progress...

docs/api/fs/readFile.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ data:
2222
link: readFile.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
```js
30+
31+
// Let's assume you want to read the content of a file named example.txt in the /home/user/documents directory.
32+
33+
codebolt.fs.readFile('example.txt', '/home/user/documents');
34+
35+
```
36+
37+
### Explaination
38+
39+
The codebolt.fs.readFile method is used to read the content of a specified file from a given directory. It has two parameters:
40+
41+
filename (string): The name of the file to be read, including the file extension (e.g., "example.txt", "data.json").
42+
43+
filePath (string): The path to the directory where the file is located. It should be a valid path in the filesystem where you have read permissions.

docs/api/fs/updateFile.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ data:
2525
link: updateFile.md
2626
---
2727
<CBBaseInfo/>
28-
<CBParameters/>
28+
<CBParameters/>
29+
30+
### Status
31+
32+
Working Progress...

docs/api/git/add.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: add.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Working Progress...

docs/api/git/branch.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ data:
2222
link: branch.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Status
28+
29+
Working Progress...

0 commit comments

Comments
 (0)