fs

package
v0.16.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(_ context.Context, args ...core.Value) (core.Value, error)

READ reads from a given file. @param {String} path - Path to file to read from. @return {Binary} - File content in binary format.

func RegisterLib

func RegisterLib(ns core.Namespace) error

RegisterLib register `FS` namespace functions. @namespace FS

func Write

func Write(_ context.Context, args ...core.Value) (core.Value, error)

WRITE writes the given data into the file. @param {String} path - File path to write into. @param {Binary} data - Data to write. @param {Object} [params] - additional parameters: @param {String} [params.mode] - Write mode. * x - Exclusive: returns an error if the file exist. It can be combined with other modes * a - Append: will create a file if the specified file does not exist * w - Write (Default): will create a file if the specified file does not exist

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL