alias

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package alias is a package for writing macOS Alias record Original code from https://github.com/LinusU/node-alias (MIT)

alias/create.go

alias/encode.go

Index

Constants

This section is empty.

Variables

View Source
var AppleEpoch = time.Date(1904, 1, 1, 0, 0, 0, 0, time.UTC)
View Source
var Type = []string{"file", "directory"}
View Source
var VolumeType = []string{"local", "network", "floppy-400", "floppy-800", "floppy-1400", "other"}

Functions

func AppleDate

func AppleDate(value time.Time) uint32

func Create

func Create(targetPath string) ([]byte, error)

func Encode

func Encode(info Info) ([]byte, error)

func GetVolumeName

func GetVolumeName(path string) (string, error)

Types

type Extra

type Extra struct {
	Type   int16
	Length uint16
	Data   []byte
}

type Info

type Info struct {
	Version int
	Target  struct {
		Type     string
		Filename string
		ID       uint32
		Created  time.Time
	}
	Volume struct {
		Name      string
		Created   time.Time
		Signature string
		Type      string
	}
	Parent struct {
		ID   uint32
		Name string
	}
	Extra []Extra
}

Jump to

Keyboard shortcuts

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