Skip to content

Commit 115883d

Browse files
committedJun 5, 2024·
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

+5-1
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

+20-1
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.

0 commit comments

Comments
 (0)
Please sign in to comment.