Socket
Socket
Sign inDemoInstall

syntex-filesystem

Package Overview
Dependencies
1
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    syntex-filesystem

A Basic File System


Version published
Maintainers
1
Install size
37.1 kB
Created

Readme

Source

SynTex Filesystem

An intelligent file system for reading and writing files.

NPM Recommended Version NPM Beta Version NPM Downloads GitHub Commits GitHub Code Size


Use This In Your Code

let Logger = require('syntex-logger'),
    FileSystem = require('syntex-filesystem');

let logger = new Logger({ pluginName : 'Demo Plugin', language : 'us', debug : true });

logger.setLogDirectory('/var/demo_plugin/logs');

let files = new FileSystem({ logger, baseDirectory : '/var/demo_plugin/' }, { initDirectories : ['example', 'logs'], enableCache : false });

var filePath = '/example/demo.json',
    exampleContent = { a : 1, b : 2 };

files.writeFile(filePath, exampleContent).then((response) => {

    logger.debug(response);

    files.readFile(filePath).then((data) => {
        
        logger.debug(data);

    }).catch((error) => {

        if(error != null)
        {
            logger.err(error);
        }
    });
});

Troubleshooting

GitHub Issues
  • Report us your Issues
  • Join our Discord Server
Discord

Keywords

FAQs

Last updated on 10 Nov 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc