nav

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFile

func AddFile(path string) error

func CopyFile

func CopyFile(src, dst string) error

func DeleteFile

func DeleteFile(path string) error

func MoveFile

func MoveFile(src, dst string) error

func NewBlockFileName

func NewBlockFileName() string

func NewNoteBlockIfNeeded

func NewNoteBlockIfNeeded(path, noteIDStr string) error

func ReadDirFilenames

func ReadDirFilenames(path string) ([]string, error)

Types

type FileInfo

type FileInfo struct {
	Name    string `json:"name"`
	RawSize int64  `json:"rawSize"`
	IsDir   bool   `json:"isDir"`

	Mode      string `json:"mode"`
	Username  string `json:"username"`
	GroupName string `json:"groupName"`
	Size      string `json:"size"`
	ModTime   string `json:"modTime"`
}

func NewFileInfo

func NewFileInfo(name string, f fs.FileInfo) *FileInfo

func ReadDirFiles

func ReadDirFiles(path string, hidden bool) ([]*FileInfo, error)

type PreviewInfo

type PreviewInfo struct {
	DirFiles []*FileInfo `json:"dirFiles,omitempty"`
	UTF8     *string     `json:"utf8,omitempty"`
	Type     PreviewType `json:"type"`
}

func Preview

func Preview(path string, hidden bool) (*PreviewInfo, error)

type PreviewType

type PreviewType string

type WorkingDir

type WorkingDir struct {
	Separator string
	Path      string
	HomeDir   string
}

func NewWorkingDir

func NewWorkingDir() (*WorkingDir, error)

Jump to

Keyboard shortcuts

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