spotlight

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Path     string
	Name     string
	Size     int64
	Modified time.Time
	IsDir    bool
}

FileInfo represents a file with full metadata (compatible with recent.FileInfo)

func SearchWithMetadata

func SearchWithMetadata(opts SearchOptions) ([]FileInfo, error)

SearchWithMetadata performs a Spotlight search and enriches results with file metadata This is the high-level business function that returns files ready for use Results are sorted by modification time (most recent first)

type FileResult

type FileResult struct {
	Path string // Full path to the file
	Name string // Filename only (extracted from path)
}

FileResult represents a file found by Spotlight

func Search(opts SearchOptions) ([]FileResult, error)

Search performs a Spotlight search for files matching the query

type SearchOptions

type SearchOptions struct {
	Query      string   // Search query (filename pattern)
	Scope      []string // Optional: limit to specific directories (not implemented yet)
	MaxResults int      // Optional: limit result count (0 = no limit)
}

SearchOptions configures Spotlight search behavior

Jump to

Keyboard shortcuts

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