Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Latest commit

 

History

History
122 lines (71 loc) · 1.6 KB

FileUtil.md

File metadata and controls

122 lines (71 loc) · 1.6 KB

mewbot / FileUtil

Class: FileUtil

Table of contents

Methods

Constructors

Methods

create

Static create(path): Promise<void>

Parameters

Name Type
path string

Returns

Promise<void>


read

Static read(path): Promise<undefined | Buffer>

Parameters

Name Type
path string

Returns

Promise<undefined | Buffer>


readJson

Static readJson(path, log?): Promise<any>

Parameters

Name Type Default value
path string undefined
log boolean true

Returns

Promise<any>


write

Static write(path, data): Promise<void>

Parameters

Name Type
path string
data string

Returns

Promise<void>


delete

Static delete(path): Promise<void>

Parameters

Name Type
path string

Returns

Promise<void>


exists

Static exists(path): Promise<boolean>

Parameters

Name Type
path string

Returns

Promise<boolean>

Constructors

constructor

new FileUtil()