Skip to content

mohif1995/Wappler-Node-JS-Extension---Create-Write-Append-File

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wappler NodeJS Extension - Create/Write/Append Files

Create a file or write to a file using custom encoding and custom flags.

Installation

1. Go to your Wappler project root directory
2. Clone the content of the modules folder to `/extensions/server_connect/modules`
3. Restart Wappler

Usage

Create a Server connect flow and search for Write File.

Path

./my.json will create a file called my.json in your project's root directory

Content

Add the content you would like to write to the file

Encoding

Default: utf8 Options: utf8, ascii, binary, hex, base64 and utf16le

Flag

Default: a Options:

Flag Description
r Open file for reading. An exception occurs if the file does not exist.
r+ Open file for reading and writing. An exception occurs if the file does not exist.
rs Open file for reading in synchronous mode.
rs+ Open file for reading and writing, asking the OS to open it synchronously. See notes for 'rs' about using this with caution.
w Open file for writing. The file is created (if it does not exist) or truncated (if it exists).
wx Like 'w' but fails if the path exists.
w+ Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists).
wx+ Like 'w+' but fails if path exists.
a Open file for appending. The file is created if it does not exist.
ax Like 'a' but fails if the path exists.
a+ Open file for reading and appending. The file is created if it does not exist.
ax+ Like 'a+' but fails if the the path exists.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%