filesystem

package
v1.7.3-0...-caeaf44 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenFile

func OpenFile(path string) error

OpenFile opens a file with the default application

Types

type DirectoryInfo

type DirectoryInfo struct {
	Key  string `json:"key" mapstructure:"key"`
	Path string `json:"path" mapstructure:"path"`
}

DirectoryInfo represents information about a directory

func GetUserDirectories

func GetUserDirectories() []DirectoryInfo

GetUserDirectories returns a list of user directories

type FileInfo

type FileInfo struct {
	Name      string `json:"name" mapstructure:"name"`
	Path      string `json:"path" mapstructure:"path"`
	Size      int64  `json:"size" mapstructure:"size"`
	Modified  int64  `json:"modified" mapstructure:"modified"`
	Extension string `json:"extension" mapstructure:"extension"`
	MimeType  string `json:"mime_type" mapstructure:"mime_type"`
}

FileInfo represents information about a file

func GetDirectoryContents

func GetDirectoryContents(path string) ([]FileInfo, error)

GetDirectoryContents returns the contents of a directory

func GetFileInfo

func GetFileInfo(path string) (*FileInfo, error)

GetFileInfo returns information about a file

Jump to

Keyboard shortcuts

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