file

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 5 Imported by: 1

README

file for GoJS

usage

import (
	"apigo.cc/gojs"
	_ "apigo.cc/gojs/file"
)

func main() {
	r, err := gojs.Run(`
import file from 'apigo.cc/gojs/file'

function main(args){
	return file.read('test.txt')
}
	`, "test.js")

    fmt.Println(r, err)
}

cache file for proformance

import file from 'apigo.cc/gojs/file'
file.cache('test.txt', true)
file.cache('images/test.png')

module.exports

function read(filename: string): string {return ''}
function readBytes(filename: string): any {return null}
function write(filename: string, data: any): void {}
function dir(filename: string): Array<FileInfo> {return null as any}
function stat(filename: string): FileInfo {return null as any}
function find(filename: string): string {return ''}
function remove(filename: string): void {}
function rename(from: string, to: string): void {}
function copy(from: string, to: string): void {}
function cache(filename: string, isCompress: boolean): void {}

full api see file.ts

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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