This module is used to perform most file system operations in hardocs-desktop app.
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.
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.
const { project } = require('hardocs-fs');
project
.create({
name: 'test-project',
docsDir: 'docs'
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.log(error);
});
const { file } = require('hardocs-fs');
file.delete({ filePath: '/path-to-file' });
Thanks goes to these wonderful people (emoji key):
Divine Hycenth 💻 🖋 🎨 📖 🤔 🚧 |
This project follows the all-contributors specification. Contributions of any kind welcome!