lib

package
v0.0.0-...-6ca358b Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const HEADERSIZE = 0x4c
View Source
const LINKFLAGS_OFFSET = 20

Variables

This section is empty.

Functions

func GetRecentDir

func GetRecentDir() (string, error)

func OpenExplore

func OpenExplore(path string) error

func ResolveShortcut

func ResolveShortcut(file *os.File) (path string, isdir bool, args string, err error)

func Run

func Run(debug bool) error

func RunApp

func RunApp(path string) error

func RunDefaultApp

func RunDefaultApp(path string) error

func RunFF

func RunFF(source *Shortcuts, query string) (string, error)

func SetupCache

func SetupCache(config *Config)

func WriteCache

func WriteCache(path string, s []Shortcut) error

Types

type Config

type Config struct {
	Folders      []string
	CacheDir     string
	EnableRecent bool
	EnableUser   bool
	EnableCache  bool
	DefaultQuery string
	OneShot      bool
	CachePath    string
}

func LoadConfig

func LoadConfig() (Config, error)

type FileAttributesFlags

type FileAttributesFlags struct {
	FILE_ATTRIBUTE_READONLY            bool
	FILE_ATTRIBUTE_HIDDEN              bool
	FILE_ATTRIBUTE_SYSTEM              bool
	Reserved1                          bool
	FILE_ATTRIBUTE_DIRECTORY           bool
	FILE_ATTRIBUTE_ARCHIVE             bool
	Reserved2                          bool
	FILE_ATTRIBUTE_NORMAL              bool
	FILE_ATTRIBUTE_TEMPORARY           bool
	FILE_ATTRIBUTE_SPARSE_FILE         bool
	FILE_ATTRIBUTE_REPARSE_POINT       bool
	FILE_ATTRIBUTE_COMPRESSED          bool
	FILE_ATTRIBUTE_OFFLINE             bool
	FILE_ATTRIBUTE_NOT_CONTENT_INDEXED bool
	FILE_ATTRIBUTE_ENCRYPTED           bool
}

func NewFileAttributesFlags

func NewFileAttributesFlags(flag uint32) FileAttributesFlags

type LinkFlags

type LinkFlags struct {
	HasLinkTargetIDList         bool
	HasLinkInfo                 bool
	HasName                     bool
	HasRelativePath             bool
	HasWorkingDir               bool
	HasArguments                bool
	HasIconLocation             bool
	IsUnicode                   bool
	ForceNoLinkInfo             bool
	HasExpString                bool
	RunInSeparateProcess        bool
	Unused1                     bool
	HasDarwinID                 bool
	RunAsUser                   bool
	HasExpIcon                  bool
	NoPidlAlias                 bool
	Unused2                     bool
	RunWithShimLayer            bool
	ForceNoLinkTrack            bool
	EnableTargetMetadata        bool
	DisableLinkPathTracking     bool
	DisableKnownFolderTracking  bool
	DisableKnownFolderAlias     bool
	AllowLinkToLink             bool
	UnaliasOnSave               bool
	PreferEnvironmentPath       bool
	KeepLocalIDListForUNCTarget bool
}

func NewLinkFlags

func NewLinkFlags(flag uint32) LinkFlags

type Origin

type Origin int
const (
	Recent Origin = iota
	Cache
	User
)

type Shortcut

type Shortcut struct {
	Path    string
	TPath   string
	Args    string
	IsDir   bool
	Parent  string
	Org     Origin
	ModTime time.Time
}

func FindFromRecent

func FindFromRecent() (shortcuts []Shortcut, err error)

func FindFromUser

func FindFromUser(folders []string) (shortcuts []Shortcut, err error)

func NewShortcut

func NewShortcut(path string, tpath string, args string, isdir bool, modtime time.Time, org Origin) (s Shortcut, err error)

func NewShortcuts

func NewShortcuts(dir string, origin Origin) ([]Shortcut, error)

func ReadCache

func ReadCache(path string) (s []Shortcut, err error)

func ReadDir

func ReadDir(dir string, org Origin) (shortcuts []Shortcut, err error)

func (Shortcut) Text

func (s Shortcut) Text() (text string)

type Shortcuts

type Shortcuts struct {
	// contains filtered or unexported fields
}

func FindShortcuts

func FindShortcuts(config Config) (s *Shortcuts, err error)

func (*Shortcuts) Merge

func (s *Shortcuts) Merge()

func (*Shortcuts) Sort

func (s *Shortcuts) Sort()

func (*Shortcuts) Unique

func (s *Shortcuts) Unique()

type WscriptShell

type WscriptShell struct {
	Shell  *ole.IUnknown
	Wshell *ole.IDispatch
}

func NewWscriptShell

func NewWscriptShell() (*WscriptShell, error)

func (*WscriptShell) Release

func (w *WscriptShell) Release()

Jump to

Keyboard shortcuts

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