util

package
v0.0.0-...-4266db3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTempDir

func CreateTempDir() (string, error)

func GetFileFromExplorer

func GetFileFromExplorer() (*models.File, error)

GetFileFromExplorer opens the file explorer, waits for the user to create or modify a file, reads the file, and returns the file's data wrapped in a models.File object.

func HandleFileEvents

func HandleFileEvents(watcher *fsnotify.Watcher, ctx context.Context) (string, error)

func InitializeWatcher

func InitializeWatcher(tempDir string) (*fsnotify.Watcher, error)

func OpenExplorer

func OpenExplorer(path string) error

func ReadFull

func ReadFull(f *os.File) []byte

func WaitForFile

func WaitForFile(tempDir string) (string, error)

func WriteData

func WriteData(rows *sql.Rows, info *models.File) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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