mimeapps

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFound = errors.New("found")

Functions

func DefaultsPathsList

func DefaultsPathsList() ([]string, error)

func DirExists

func DirExists(path string) bool

func DirHome

func DirHome() (string, error)

func ExpandHome

func ExpandHome(path string) (string, error)

Expand expands the path to include the home directory if the path is prefixed with `~`. If it isn't prefixed with `~`, the path is returned as-is.

func FileExists

func FileExists(path string) bool

func FilenameToApplication

func FilenameToApplication(filename string) ([]string, bool, error)

func MimeAppsPathsList

func MimeAppsPathsList() ([]string, error)

func MimeTypeToApplication

func MimeTypeToApplication(mimetype string) (string, bool, error)

func MimetypeToDesktopEntry

func MimetypeToDesktopEntry(mimetype string) (string, error)

func MimetypeToDesktopFile

func MimetypeToDesktopFile(mimetype string) (string, error)

func OpenLocal

func OpenLocal(filename string) error

func OpenRemote

func OpenRemote(filename string, r io.Reader) (string, error)

func Scan

func Scan(s string) []string

Types

type ErrDesktopFileNotFound

type ErrDesktopFileNotFound struct {
	EntryName string
}

func (ErrDesktopFileNotFound) Error

func (e ErrDesktopFileNotFound) Error() string

type ErrInvalidDesktopFile

type ErrInvalidDesktopFile struct {
	Path   string
	Reason string
}

func (ErrInvalidDesktopFile) Error

func (e ErrInvalidDesktopFile) Error() string

type ErrNoDesktopEntry

type ErrNoDesktopEntry struct {
	Mimetype string
}

func (ErrNoDesktopEntry) Error

func (e ErrNoDesktopEntry) Error() string

type ErrNoOpener

type ErrNoOpener struct {
	Filename string
	Err      error
}

func (ErrNoOpener) Error

func (e ErrNoOpener) Error() string

type ErrUnknownType

type ErrUnknownType struct {
	Filename string
}

func (ErrUnknownType) Error

func (e ErrUnknownType) Error() string

type XDGDirs

type XDGDirs struct {
	ConfigHome string
	DataHome   string
	ConfigDirs []string
	DataDirs   []string
}

func XDG

func XDG() (dirs XDGDirs, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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