Documentation ¶
Overview ¶
Package file includes file related manipulations.
Index ¶
- func CreateZipHandler(w http.ResponseWriter, r *http.Request)
- func DecompressHandler(w http.ResponseWriter, r *http.Request)
- func FindHandler(w http.ResponseWriter, r *http.Request)
- func GetFileHandler(w http.ResponseWriter, r *http.Request)
- func GetFilesHandler(w http.ResponseWriter, r *http.Request)
- func GetOutlineHandler(w http.ResponseWriter, r *http.Request)
- func GetZipHandler(w http.ResponseWriter, r *http.Request)
- func NewFileHandler(w http.ResponseWriter, r *http.Request)
- func RefreshDirectoryHandler(w http.ResponseWriter, r *http.Request)
- func RemoveFileHandler(w http.ResponseWriter, r *http.Request)
- func RenameFileHandler(w http.ResponseWriter, r *http.Request)
- func SaveFileHandler(w http.ResponseWriter, r *http.Request)
- func SearchTextHandler(w http.ResponseWriter, r *http.Request)
- func UploadHandler(w http.ResponseWriter, r *http.Request)
- type Node
- type Snippet
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.