service

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileNode

type FileNode struct {
	Name         string      `json:"name"`
	Size         int64       `json:"size,omitempty"`
	FileType     string      `json:"fileType,omitempty"`
	Path         string      `json:"path"`
	CreatedDate  int64       `json:"createdDate,omitempty"`
	LastModified int64       `json:"lastModified,omitempty"`
	IsDir        bool        `json:"isDir"`
	Children     []*FileNode `json:"children,omitempty"`
}

type FileTreeResult added in v1.1.4

type FileTreeResult struct {
	Tree      interface{}
	DirCount  int64
	FileCount int64
}

func GenerateFileTree

func GenerateFileTree(root string, organize bool) (*FileTreeResult, error)

GenerateFileTree recursively generates a file tree for the given directory

type OrganizedTree

type OrganizedTree struct {
	Dirs  []*FileNode `json:"dirs"`
	Files []*FileNode `json:"files"`
}

func OrganizeFileTree

func OrganizeFileTree(node *FileNode) OrganizedTree

Organizes the file tree into a flat list

Jump to

Keyboard shortcuts

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