JCore.FileSystem
Table of Contents
Introduction
JCore.FileSystem is a file system library for JavaScript providing a simple and easy to use file system API based on Node.js. It is designed to be used in a Node.js environment and a core part of the JCore Framework.
Installation
To install JCore.FileSystem, run the following command:
npm install @sniper-code/jcore-filesystem
Uninstall
To uninstall JCore.FileSystem, run npm uninstall @sniper-code/jcore.filesystem
.
Exposed API
All the exposed API is documented below.
Network
This API is used to access the list of network. Example:
const {Network} = require('Jcore.FileSystem');
const network = new Network();
console.log(network.network);
/*
* Prints the list of network in following format.
* [ '{Device_Name}':'{IP_Address}' ]
*/
File
This API is used to access file system and self explanatory endpoints. Example:
const {
File_System
} = require('Jcore.FileSystem');
// All the exposed endpoints are static methods of File_System class so you can access them directly.
// Example:
console.log(File_System.scan_dir('./))
// Prints the list of files and directories in the current directory.
All the endpoints are listed below.
- File_System.path_resolve
- File_System.is_file
- File_System.file_path
- File_System.file_ext
- File_System.file_name
- File_System.file_name_with_ext
- File_System.file_size
- File_System.file_exists
- File_System.file_stats
- File_System.read_file
- File_System.write_file
- File_System.update_file
- File_System.append_file
- File_System.delete_file
- File_System.rename_file
- File_System.copy_file
- File_System.move_file
- File_System.is_dir
- File_System.dir_path
- File_System.dir_name
- File_System.dir_exists
- File_System.scan_dir
- File_System.search_dir
- File_System.scan_dir_recursive_depth
- File_System.scan_dir_recursive
- File_System.mkdir
- File_System.rename_dir
- File_System.copy_dir
- File_System.delete_dir
Release
Visit GitHub Release to see the latest release.
Package
Visit GitHub Packages to see the latest release package.