hardocs-fs
TypeScript icon, indicating that this package has built-in type declarations

0.0.41 • Public • Published

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!

Readme

Keywords

Package Sidebar

Install

npm i hardocs-fs

Weekly Downloads

0

Version

0.0.41

License

GPLv2

Unpacked Size

74 kB

Total Files

39

Last publish

Collaborators

  • dnature