file

package
v0.0.0-...-d42310f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 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 CreateZipHandler

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

CreateZipHandler handles request of creating zip.

func DecompressHandler

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

DecompressHandler handles request of decompressing zip/tar.gz.

func FindHandler

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

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

func GetFileHandler

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

GetFileHandler handles request of opening file by editor.

func GetFilesHandler

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

GetFilesHandler 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 GetOutlineHandler

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

GetOutlineHandler gets outfile of a go file.

func GetZipHandler

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

GetZipHandler handles request of retrieving zip file.

func NewFileHandler

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

NewFileHandler handles request of creating file or directory.

func RefreshDirectoryHandler

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

RefreshDirectoryHandler handles request of refresh a directory of file tree.

func RemoveFileHandler

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

RemoveFileHandler handles request of removing file or directory.

func RenameFileHandler

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

RenameFileHandler handles request of renaming file or directory.

func SaveFileHandler

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

SaveFileHandler handles request of saving file.

func SearchTextHandler

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

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

func UploadHandler

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

UploadHandler handles request of file upload.

Types

type Node

type Node struct {
	Id        string  `json:"id"`
	Name      string  `json:"name"`
	Path      string  `json:"path"`
	IconSkin  string  `json:"iconSkin"` // Value should be end with a space
	IsParent  bool    `json:"isParent"`
	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