file_manager
A library that provides predefined functions for file system operations.
Installation
To install the library, use npm:
npm install FM@latest
Now it's easy to manage files using JavaScript with !
Usage
const FM = require("file_manager");
FM.CreateFile("test.js");
FM.CreateDir("Test");
API
CreateFile(filepath)
Create a new file with the given file path.
RenameFile(oldName,newName)
Rename a file name with the given name.
DeleteFile(filepath)
Delete a file with the given file path.
ReadFile(filepath)
Reads the data from a given file and return data.
WriteData(filepath,data)
Write's Data to a file with the provided name.
CreateDir(filepath)
Create's a new directory with the given directory name.
DeleteDir(filepath)
Deletes a directory with the given directory path.
Is_existsFile(filepath)
Checks whether the given file exists or not.
Is_existsData(filepath,data)
Checks whether the given target data exists in the given file or not.
Is_existsDir(directorypath)
Checks if a directory with the given directory name exists or not.
InsertDataAtEnd(filepath,data)
Appends data at the end of the the given file.
insertDataAtStart(filepath,data)
Appends data at the start of the the given file.
License
This project is licensed under the MIT License.