A library that provides predefined functions for file system operations making file managing easy in javascript.
To install the library, use npm:
npm install zypher-manager@latest
Now it's easy to manage files using JavaScript with Zypher!
const manager = require("zypher-manager");
// Create a file
manager.CreateFile("test.js");
// Create a directory
manager.CreateDir("Test");
Create a new file with the given file path.
renameFile(oldName,newName)
Rename a file name with the given name.
Delete a file with the given file path.
Reads the data from a given file and return data.
Write's Data to a file with the provided name.
Create's a new directory with the given directory name.
Deletes a directory with the given directory path.
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.
renameDir(oldPath,newPath)
Renames the given directory path with the given new path.
moveFile(sourcePath,destinationPath)
Moves a file to a new given location.
copyFile(sourcePath,destinationPath)
Copy the file to the given destination file.
copyDirectory(source,destination)
Copy the directory to the given destination.
copyFileToDirectory(sourcePath,destinationPath)
Copy the file to the given destination.
searchFileInDirectory(directoryPath,fileName)
Searches for a file in the specified directory.
Creates all the files from a given array of files of path type.
getFileStats(filePath,sizeUnit)
Creates all the files from a given array of files of path type.
convertFileSize(sizeInBytes,unit)
Converts the given number of bytes to a specified format.
Checks whether the given string is a valid file format string and returns true if it is valid otherwise false.
This project is licensed under the MIT License.