Home Reference Source Test
import PromiseFileSystem from '@token-io/tpp/src/security/PromiseFileSystem.js'
public class | source

PromiseFileSystem

Static Method Summary

Static Public Methods
public static

readFile(filename: string): Promise

Reads a file from the filesystem (from the given directory)

public static

writeFile(filename: *, data: *): *

Static Private Methods
private static

_ensureExists(path: *, cb: *)

private static

_getFullFilename(filename: *): *

Static Public Methods

public static readFile(filename: string): Promise source

Reads a file from the filesystem (from the given directory)

Params:

NameTypeAttributeDescription
filename string

file to read

Return:

Promise

with data

public static writeFile(filename: *, data: *): * source

Params:

NameTypeAttributeDescription
filename *
data *

Return:

*

Static Private Methods

private static _ensureExists(path: *, cb: *) source

Params:

NameTypeAttributeDescription
path *
cb *

private static _getFullFilename(filename: *): * source

Params:

NameTypeAttributeDescription
filename *

Return:

*