New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

nodefswork

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodefswork

add, read, delete file from user input in node

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Study on using node.JS filesystem

https://nodejs.org/api/fs.html

1) Create a File - userInputToFile.js

* Using input from terminal readline prompts, this file will accomplish three things:

    --- Stores File Name input
    --- Store File content input
    --- Creates a new file with the stored information

* Node.js modules used:
   
    --- rl.question();
    --- fs.writeFile();

2) Read a File - readFile.js

* Using input from terminal readline prompts, this file will accomplish two things:

    --- Stores input for file name
    --- Displays the inner text of the file

* Node.js modules used:

    --- rl.question();
    --- fs.readFile();

3) Copy a File - copyFile.js

* Using input from terminal readline prompts, this file will accomplish three things:

    --- Stores input for original file name
    --- Stores input for new file name
    --- Creates a new file, duplicating the contents of the original file

* Node.js modules used:

    --- rl.question();
    --- fs.copyFile();

4) Update a File - updateFile.js

* Using input from terminal readline prompts, this file will accomplish two things:

    --- Stores input for file name
    --- Appends updated content to the end of the file

* Node.js modules used:

    --- rl.question();
    --- fs.appendFile();        

5) Delete a File - unlinkFile.js

* Using input from terminal readline prompts, this file will accomplish two things:

    --- Stores input for file name
    --- Delete the file 

* Node.js modules used:

    --- rl.question();
    --- fs.unlink();

Keywords

fs

FAQs

Package last updated on 08 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts