hardocs-fs
v0.0.41
Published
Helper functions to perform most file/folder operations meant to be used in an electron app.
Downloads
23
Readme
Hardocs Fs (File System) module
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):
This project follows the all-contributors specification. Contributions of any kind welcome!