file

package
v0.0.0-...-43a0c9e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package file includes file related manipulations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateZip

func CreateZip(w http.ResponseWriter, r *http.Request)

CreateZip handles request of creating zip.

func Find

func Find(w http.ResponseWriter, r *http.Request)

Find handles request of find files under the specified directory with the specified filename pattern.

func GetFile

func GetFile(w http.ResponseWriter, r *http.Request)

GetFile handles request of opening file by editor.

func GetFiles

func GetFiles(w http.ResponseWriter, r *http.Request)

GetFiles handles request of constructing user workspace file tree.

The Go API source code package also as a child node, so that users can easily view the Go API source code in file tree.

func GetOutline

func GetOutline(w http.ResponseWriter, r *http.Request)

GetOutline gets outfile of a go file.

func GetZip

func GetZip(w http.ResponseWriter, r *http.Request)

GetZip handles request of retrieving zip file.

func NewFile

func NewFile(w http.ResponseWriter, r *http.Request)

NewFile handles request of creating file or directory.

func RefreshDirectory

func RefreshDirectory(w http.ResponseWriter, r *http.Request)

RefreshDirectory handles request of refresh a directory of file tree.

func RemoveFile

func RemoveFile(w http.ResponseWriter, r *http.Request)

RemoveFile handles request of removing file or directory.

func RenameFile

func RenameFile(w http.ResponseWriter, r *http.Request)

RenameFile handles request of renaming file or directory.

func SaveFile

func SaveFile(w http.ResponseWriter, r *http.Request)

SaveFile handles request of saving file.

func SearchText

func SearchText(w http.ResponseWriter, r *http.Request)

SearchText handles request of searching files under the specified directory with the specified keyword.

func Upload

func Upload(w http.ResponseWriter, r *http.Request)

Upload handles request of file upload.

Types

type Node

type Node struct {
	Name      string  `json:"name"`
	Path      string  `json:"path"`
	IconSkin  string  `json:"iconSkin"`  // Value should be end with a space
	Type      string  `json:"type"`      // "f": file, "d": directory
	Creatable bool    `json:"creatable"` // whether can create file in this file node
	Removable bool    `json:"removable"` // whether can remove this file node
	IsGoAPI   bool    `json:"isGOAPI"`
	Mode      string  `json:"mode"`
	Children  []*Node `json:"children"`
}

Node represents a file node in file tree.

type Snippet

type Snippet struct {
	Path     string   `json:"path"`     // file path
	Line     int      `json:"line"`     // line number
	Ch       int      `json:"ch"`       // column number
	Contents []string `json:"contents"` // lines nearby
}

Snippet represents a source code snippet, used to as the result of "Find Usages", "Search".

Jump to

Keyboard shortcuts

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