8000 grial/connector-fs at master · sergiodxa/grial · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 2, 2017. It is now read-only.

Latest commit

 

History

History

connector-fs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

@grial/connector-fs

Grial datasource connector for the file system.

Required enviroment variables

None

Usage

Install it

npm i @grial/connector-fs

Add it to your connectors.js files

exports.fs = require('@grial/connector-fs')

API

write(filePath: string, data: Object, options: Object | string = 'utf8'): string

Write a new file to the specified file path with the given data.

read(filePath: string, options: Object | string = 'utf8'): string

Read a file from the disk.

delete(filePath: string): boolean

Delete the specified file from disk

check(filePath: string): boolean

Check the the specified file exists

0