file

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package file provides functions for dealing with files.

Index

Constants

This section is empty.

Variables

View Source
var Scope = wdte.S().Map(map[wdte.ID]wdte.Func{
	"open":   wdte.GoFunc(Open),
	"create": wdte.GoFunc(Create),
	"append": wdte.GoFunc(Append),
})

Scope is a scope containing the functions in this package.

Functions

func Append

func Append(frame wdte.Frame, args ...wdte.Func) wdte.Func

Append is a WDTE function with the following signature:

append path

Opens the file at path for appending, creating it if it doesn't already exist, and returns it.

func Create

func Create(frame wdte.Frame, args ...wdte.Func) wdte.Func

Create is a WDTE function with the following signature:

create path

Creates the file at path, truncating it if it already exists, and returns it.

func Open

func Open(frame wdte.Frame, args ...wdte.Func) wdte.Func

Open is a WDTE function with the following signature:

open path

Opens the file at path and returns it.

Types

type File

type File struct {
	*os.File
}

File wraps an os.File, allowing it to be used as a WDTE function.

func (File) Call

func (f File) Call(frame wdte.Frame, args ...wdte.Func) wdte.Func

func (File) String added in v0.2.3

func (f File) String() string

Jump to

Keyboard shortcuts

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