npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

filemanagementsystemfornode

v1.0.2

Published

A file management system for node.js application making managements of files easier, all in one code, you can delete, move, etc, files all in one code, making ability to manage a system eg a application requiring transfering of files in folders easier

Downloads

19

Maintainers

whitzscottwhitzscott

Keywords

typescriptnodejsfile-managementfile-operationsfilesystemfile-utilitiesfile-wrappercustom-error-handlingerror-handlingrename-filemove-filecopy-filedelete-fileappend-contentget-file-infoget-file-metadatadirectory-managementlist-fileslist-directoriesrecursive-directory-listingcheck-file-existencecreate-directorydelete-directorywrite-fileread-filefile-permissionsfile-lockingtemporary-filesfile-synchronizationdata-compressionzip-filesunzip-filestar-filesgzip-filesdecompress-filesencryptiondecryptionAES-encryptionRSA-encryptionsecure-file-storagefile-checksumhashingintegrity-checkversioningfile-backupsrestore-filesdisk-space-analysislarge-file-handlingparallel-file-processingbatch-file-operationsstreaming-filesfile-chunkingmerge-filessplit-fileslog-file-managementconfig-file-managementdata-parsingJSON-file-handlingCSV-file-processingXML-file-processingYAML-file-handlingbinary-file-handlingmetadata-parsingtimestamp-retrievalautomatic-renamingfile-classificationmachine-learning-file-managementintelligent-searchdeep-learning-file-organizationOCR-integrationcontext-aware-file-operationspredictive-file-managementsemantic-searchdata-indexingdocument-managemententerprise-document-storagedigital-asset-managementfile-clusteringgraph-based-file-navigationblockchain-file-storageIPFS-integrationdecentralized-storagezero-knowledge-storageedge-computing-file-storageserverless-file-handlingmulti-platform-supportcross-device-syncremote-file-accesscloud-storageAWS-S3-integrationGoogle-Drive-integrationDropbox-file-syncOneDrive-integrationreal-time-file-collaborationaudit-loggingfile-monitoringsystem-loggingenterprise-securityGDPR-complianceHIPAA-compliancerole-based-accessauthenticationtoken-based-accessfile-permission-controlmulti-threaded-file-processingbig-data-file-storagescientific-data-storagefinancial-records-managementmedical-records-storagelegal-document-managementimage-processingvideo-file-handlingaudio-file-managementmedia-file-organizationgame-development-assets3D-model-file-storagemetadata-driven-automationself-healing-filesystemcloud-native-file-storagereal-time-indexingAI-assisted-file-organizationsmart-file-taggingvoice-search-filesnatural-language-file-searchevent-driven-file-managementfile-change-detectionreal-time-backupincremental-backupsdisaster-recoverycustomizable-file-rulesworkflow-automationlegal-compliancedocument-signingcertified-backupsdata-lifecycle-managementIoT-data-storagehigh-performance-storagelow-latency-file-operationsGPU-accelerated-file-processingquantum-safe-storagedata-governancepredictive-maintenanceautomated-file-classificationcognitive-file-organizationstorage-analyticsdisk-cleanupfile-defragmentationdistributed-file-storagecollaborative-editingworkflow-managementcorporate-file-strategyAI-powered-file-retrievalpersonalized-file-organizationdigital-rights-managementsecure-document-storageAI-data-lakescontent-addressable-storagequantum-computing-file-managementnext-gen-filesystemsAI-assisted-searchsemantic-file-retrievalsmart-folder-creationmetadata-enrichmentfile-recommendation-systemssmart-file-prioritizationauto-scaling-storagecloud-redundancyserverless-cloud-backupsbackup-automationblock-level-storageflash-storage-managementdatabase-file-storagehybrid-cloud-storagesecure-P2P-file-sharingenterprise-file-distributionnetwork-file-transferdeduplicationreal-time-stream-processinginteractive-data-visualizationfile-query-engineindexing-engineclustered-file-storageautomated-taggingdeep-learning-file-classificationcontext-aware-storageself-organizing-file-systemreal-time-metadata-extractioncognitive-searchprivacy-preserving-file-storagefederated-learning-file-managementprivacy-preserving-file-accesscontent-based-file-searchAI-driven-file-organizationunsupervised-file-clusteringfuzzy-file-searchsmart-content-deduplicationintelligent-content-archivingmachine-learning-data-processingexplainable-AI-file-managementnatural-language-processing-searchmulti-agent-file-managementadaptive-file-storagecontextual-file-retrievalmulti-cloud-storage-integrationquantum-encryption-for-filesAI-assisted-data-migrationsecure-data-erasurepolicy-driven-storageself-configuring-filesystemautomated-file-groupingdeep-metadata-analysisprivacy-centric-data-storageself-learning-file-systemsblockchain-secured-file-storagedigital-identity-file-securityAI-powered-cloud-storageautomated-document-taggingprivacy-enhanced-data-storagefederated-file-sharingopen-source-file-systemsintelligent-document-processingadaptive-access-controlsecure-data-synchronizationintelligent-duplicate-detectionlightweight-file-indexingpolicy-driven-file-accessdata-governance-frameworklarge-scale-data-indexingAI-powered-data-cleaninghigh-availability-storageAI-powered-file-trackingnext-gen-data-managementcontent-driven-file-navigationcross-domain-file-accessreal-time-digital-archivingedge-compute-storagesemantic-data-labelingcollaborative-cloud-file-storagemulti-user-file-editingdata-mesh-storagemodular-storage-architectureenterprise-asset-managementfederated-storage-networkscloud-native-data-protectioncomposable-file-systemscontainerized-file-storagereal-time-streaming-storage

Readme


📘 File Management System - TypeScript

A powerful, flexible, and chainable file management system for Node.js.

📘 File Management System - TypeScript

A powerful, flexible, and chainable file management system for Node.js.
This system provides an easy way to manage files and directories while supporting:

  • Custom error handling
  • Custom chainable methods
  • Advanced file operations like compression, metadata retrieval, and content manipulation.

📌 Key Features

🚀 File Operations

Rename, Move, Copy, and Delete files
Append content to files
Retrieve compressed file content (getInfo())
Retrieve file metadata (getMetaInfo())

📂 Directory Operations

Create, Delete, and List directories
Check if a file/folder exists (syncExist())

⚙ Customization & Error Handling

Custom error handling (e.g., auto-create missing files on error)
Add custom chainable methods (addMethod())
Invoke custom chain methods dynamically (invokeMethod())


📥 Installation

To install and use this package, run:

git clone https://github.com/Whitzzscott/FileManagement.git
cd FileManagement
npm install

🛠 Usage Example

This example demonstrates:

  • Error handling: Automatically creating a missing file if an error occurs.
  • Custom chainable methods: Adding a method that logs the file path.
  • File operations: Renaming, moving, copying, appending, and deleting a file.
import { FileWrapper } from "./wrappers/FileWrapper";

const file = new FileWrapper("./testFolder/sample.txt");

// ✅ Custom error handling: Auto-create missing files when they are not found
file.errorOnFound = (error) => {
    if (error.code === "ENOENT") {
        file.sync().writeFile("Default content");
        console.log(`📄 File created: ${file.getPath()}`);
    }
};

// ✅ Add a custom method (e.g., logging the file path)
file.addMethod("logPath", function () {
    console.log("File is at:", this.getPath());
    return this;
});

// ✅ Chainable file operations
(async () => {
    file
        .rename("renamed.txt")  // Renames file
        .invokeMethod("logPath") // Logs new file path
        .move("./testFolder/moved") // Moves file to a new folder
        .copy("./backup")  // Creates a copy in the backup folder
        .append("\nMore content added.") // Appends text to the file
        .delete();  // Deletes the file

    console.log("📄 Compressed File Content:", file.getInfo());
    console.log("📑 File Metadata:", file.getMetaInfo());
    console.log("📂 Files in directory:", file.list());
})();

📜 API Reference

This file management system offers multiple operations for handling files and folders.

📂 File Operations

| Method | Description | Example | |--------|------------|---------| | rename(newName: string) | Renames the file | file.rename("newName.txt") | | move(destination: string) | Moves the file to a new directory | file.move("./newFolder") | | copy(destination: string) | Copies the file to a new location | file.copy("./backup") | | delete() | Deletes the file permanently | file.delete() | | writeFile(content: string) | Writes new content to the file (overwrites existing content) | file.writeFile("Hello, world!") | | append(content: string) | Appends new content to the file | file.append("\nNew content") |

📁 Directory Operations

| Method | Description | Example | |--------|------------|---------| | syncExist() | Checks if a file or folder exists | if (file.syncExist()) {...} | | sync() | Ensures the directory exists (creates it if missing) | file.sync() | | list() | Lists all files in the directory | console.log(file.list()) |

📊 File Info & Metadata

| Method | Description | Example | |--------|------------|---------| | getInfo() | Reads and compresses the entire file content | console.log(file.getInfo()) | | getMetaInfo() | Retrieves metadata such as size, creation date, and modification date | console.log(file.getMetaInfo()) |

⚙ Customization & Error Handling

| Method | Description | Example | |--------|------------|---------| | errorOnFound = (error) => {...} | Custom error handling (e.g., auto-create files) | file.errorOnFound = (err) => {...} | | addMethod(name, method) | Adds a custom chainable method | file.addMethod("customMethod", function () {...}) | | invokeMethod(name, ...args) | Calls a custom method dynamically | file.invokeMethod("customMethod") |


🔧 How to Use This Project

  1. Install the package
    npm install filemanagementsystemfornode
  2. Run the script
    npm run start
  3. Modify settings
    • Change file paths in src/main.ts to test different operations.
    • Modify core functionality in src/Wrapper if necessary.

📜 License

This project is open-source and free to use.


💡 Future Enhancements

We plan to add:

  • 🔹 File encryption support (AES, RSA encryption for file security)
  • 🔹 File versioning (track changes over time)
  • 🔹 Logging & monitoring system (track operations in a log file)

🚀 Enjoy simplified file management with powerful chaining!
Feel free to suggest new features or improvements! 🎯


👨‍💻 Author

WhitzScott - Developer of the File Management System.
If you have questions or ideas, feel free to reach out!