handlers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListDirFiles

func ListDirFiles(dir string) gin.HandlerFunc

ListDirFiles provides a gin.HandlerFunc that describes the directories/files in a directory.

Types

type DirFiles

type DirFiles struct {
	Dir            []string         `json:"dir"`
	FileDescriptor []FileDescriptor `json:"file_descriptor,omitempty"`
}

DirFiles is used to list the files in a directory.

type FileDescriptor

type FileDescriptor struct {
	IsDir   bool      `json:"is_dir"`
	ModTime time.Time `json:"mod_time,omitempty"`
	Mode    string    `json:"mode,omitempty"`
	Name    string    `json:"name,omitempty"`
	Size    int64     `json:"size,omitempty"`
}

FileDescriptor provides the directory/file description.

Jump to

Keyboard shortcuts

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