filemanager

package
v5.0.2-beta9 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 12 Imported by: 3

Documentation

Overview

Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var (
	EncodedSep   = com.URLEncode(`/`)
	EncodedSlash = com.URLEncode(`\`)
	EncodedSepa  = com.URLEncode(echo.FilePathSeparator)
)

Functions

func New

func New(root string, editableMaxSize int, ctx echo.Context) *fileManager
func Search(prefix string, nums ...int) []string

Search 自动完成查询文件

func SearchDir

func SearchDir(prefix string, nums ...int) []string

SearchDir 自动完成查询文件

func SearchFile

func SearchFile(prefix string, nums ...int) []string

SearchFile 自动完成查询文件

Types

type SortByFileType

type SortByFileType []os.FileInfo

func (SortByFileType) Len

func (s SortByFileType) Len() int

func (SortByFileType) Less

func (s SortByFileType) Less(i, j int) bool

func (SortByFileType) Swap

func (s SortByFileType) Swap(i, j int)

type SortByModTime

type SortByModTime []os.FileInfo

func (SortByModTime) Len

func (s SortByModTime) Len() int

func (SortByModTime) Less

func (s SortByModTime) Less(i, j int) bool

func (SortByModTime) Swap

func (s SortByModTime) Swap(i, j int)

type SortByModTimeDesc

type SortByModTimeDesc []os.FileInfo

func (SortByModTimeDesc) Len

func (s SortByModTimeDesc) Len() int

func (SortByModTimeDesc) Less

func (s SortByModTimeDesc) Less(i, j int) bool

func (SortByModTimeDesc) Swap

func (s SortByModTimeDesc) Swap(i, j int)

type SortByNameDesc

type SortByNameDesc []os.FileInfo

func (SortByNameDesc) Len

func (s SortByNameDesc) Len() int

func (SortByNameDesc) Less

func (s SortByNameDesc) Less(i, j int) bool

func (SortByNameDesc) Swap

func (s SortByNameDesc) Swap(i, j int)

type SortDirEntryByFileType

type SortDirEntryByFileType []fs.DirEntry

func (SortDirEntryByFileType) Len

func (s SortDirEntryByFileType) Len() int

func (SortDirEntryByFileType) Less

func (s SortDirEntryByFileType) Less(i, j int) bool

func (SortDirEntryByFileType) Swap

func (s SortDirEntryByFileType) Swap(i, j int)

Jump to

Keyboard shortcuts

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