Skip to content

Helper functions to perform most file/folder operations meant to be used in an electron app.

License

Notifications You must be signed in to change notification settings

Hardocs/hardocs-fs

Repository files navigation

Hardocs Fs (File System) module

All Contributors

This module is used to perform most file system operations in hardocs-desktop app.

Installation

npm install hardocs-fs
  # or
yarn add hardocs-fs

Hardocs Fs exports a lot of modules which includes project, file and cwd etc for most operations.

Basic Usage

Get your os current working directory:

const { cwd } = require('hardocs-fs');

cwd.get(); // => returns current working directory

cwd.set('path-to-dir'); // => Sets specified path as the current working directory.

Create a hardocs project (Basic)

const { project } = require('hardocs-fs');

project
  .create({
    name: 'test-project',
    docsDir: 'docs'
  })
  .then((response) => {
    console.log(response);
  })
  .catch((error) => {
    console.log(error);
  });

File operations (Basic delete operation)

const { file } = require('hardocs-fs');

file.delete({ filePath: '/path-to-file' });

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Divine Hycenth

💻 🖋 🎨 📖 🤔 🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Helper functions to perform most file/folder operations meant to be used in an electron app.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •