utils

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirectory

func CreateDirectory(path string) error

CreateDirectory creates a new directory

func DeleteFile

func DeleteFile(path string) error

DeleteFile deletes a file or directory

func FormatSize

func FormatSize(bytes int64) string

FormatSize formats bytes into human-readable size

func GetFiles

func GetFiles(path string) (models.DirectoryEntries, error)

func RenameFile

func RenameFile(oldPath, newName string) error

RenameFile renames a file or directory

func SearchFiles

func SearchFiles(basePath, query string) ([]models.FileEntry, error)

SearchFiles searches for files/folders matching the query

func SortEntries

func SortEntries(entries []models.FileEntry, sortBy, order string) []models.FileEntry

SortEntries sorts file entries by field and direction

func UrlToFilePath

func UrlToFilePath(basePath string, url string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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