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

files_js

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
Package was removed
Sorry, it seems this package was removed from the registry

files_js

This is my personal library for handling files in nodejs

unpublished
latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

This is my personal lib to handle files with nodejs

Syncronous files

fileExists. returns true if file exists @param {String} path file_exists(path)

fileNotExists. @param {String} path file_not_exists(path)

ls_dir list all file from directory path this function returns a list of all values from a directory @param String path ls_dir(path)

list directories. this function returns a list of directoris with in the passed directory @param String path ls_dirs(path)

list all files in directory this function returns a list of files with in the passed directory @param String path ls_files(path)

mkdir. this is a humble function that make a directory that is passed if creates the directories recursibly @param {string} path to directory relative paths are from the current working dir ex:./data/mined/companies mkdir(path)

write_file this is a humble function that make a file a writes a string on it @param {string} path to directory @param {string} string to be written write_file((path, string = ''))

read_file reads a text from a file returns as a string @param {string} path to directory read_file(path)

mv remove an file @param {String} from_path @param {String} to_path mv(from_path, to_path)

rm_file remove an file @param {String} path rm_file(pat)

rm_dir remove an directory, with options can be passed @param {String} path @obj { recursive: true force: true } options rm_dir(path, options)

Json Functins

write_json. @param {} obj @param {} path write_json(obj, path)

read_json. @param {} path read_json(path)

delete_json. @param {} path delete_json(path)

Binary functions

read_binary. this function reads a binary file from disk return a binary buffer obj @param {} path read_binary(path)

write_binary. this function writes down a binary file to disk from a binary buff @param {} buff @param {} path write_binary(buff, path)

write_binstr. this function writes down a binary string to disk @param {} bin_string @param {} path write_binstr(bin_str, path)

Keywords

fs

FAQs

Package last updated on 04 Mar 2023

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