utils

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	CommitSHA = "unknown"
)

Functions

func CopyFileObject

func CopyFileObject(filePath string) error

CopyFileObject attempts to place a "file object" onto the clipboard. - On macOS, it calls AppleScript to set the clipboard to a POSIX file reference. - On non-macOS, it does nothing.

func EstimateTokens

func EstimateTokens(text string) int

EstimateTokens provides a rough estimate of the number of tokens in the given text. This is based on the heuristic that one token is approximately four characters.

func IsHiddenPath

func IsHiddenPath(path string) bool

func IsTextFile

func IsTextFile(filePath string) (bool, error)

IsTextFile returns true if the file at filePath appears to be a text file.

func VersionInfo

func VersionInfo() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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