wdte: github.com/DeedleFake/wdte/std/io/file Index | Files

package file

import "github.com/DeedleFake/wdte/std/io/file"

Package file provides functions for dealing with files.

Index

Package Files

file.go

Variables

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.

func Append Uses

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 Uses

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 Uses

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.

type File Uses

type File struct {
    *os.File
    // contains filtered or unexported fields
}

File wraps an os.File, allowing it to be used as a WDTE function. While it contains unexproted fields, it is safe for a client to simply wrap an *os.File in it manually.

A file is considered a "File" by reflection, as well as a "Reader" if it is opened for reading and a "Writer" if it is opened for writing. If the file was created manually, it will be considered both a reader and a writer.

func (File) Call Uses

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

func (File) Reflect Uses

func (f File) Reflect(name string) bool

func (File) String Uses

func (f File) String() string

Package file imports 4 packages (graph) and is imported by 1 packages. Updated 2018-11-01. Refresh now. Tools for package owners.