openineditor

package module
v0.0.0-...-4f3f3f3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

type Editor struct {
	Command     string
	Flags       []string
	OpenedFiles []*File
}

Editor "object"

func (*Editor) LastFile

func (e *Editor) LastFile() (f *File, err error)

LastFile return the last opened file or return error if no file was opened

func (*Editor) OpenFile

func (e *Editor) OpenFile(f *File) (err error)

OpenFile executes the Editor to open the specified File

func (*Editor) OpenTempFile

func (e *Editor) OpenTempFile(f *File) (err error)

OpenTempFile executes the Editor to open a TempFile

type File

type File struct {
	FileName string
	FilePath string
	Content  []byte
	File     *os.File
}

File "object"

func NewTempFile

func NewTempFile(fileName string, content []byte) (f *File, err error)

NewTempFile create a File in the OS temporary directory

func (*File) CreateInTempDir

func (f *File) CreateInTempDir() (err error)

CreateInTempDir create the File in the OS temporary directory

Jump to

Keyboard shortcuts

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