document

package
v0.0.0-...-656eded Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDoesNotExist error = errors.New("no file found in path")
View Source
var ErrIsADirectory error = errors.New("path is a directory")

Functions

This section is empty.

Types

type Doc

type Doc struct {
	Name string
	Path string

	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(path string) (*Doc, error)

New returns a *Doc instance.

func (*Doc) AbsoluteDir

func (d *Doc) AbsoluteDir() string

AbsoluteDir returns d path from root.

func (*Doc) Base64

func (d *Doc) Base64() string

Base64 returns the base64 encoding of d content.

func (*Doc) Content

func (d *Doc) Content() []byte

Content returns the content of d.

func (*Doc) Dir

func (d *Doc) Dir() string

Dir returns d path from working dir.

func (*Doc) Sha256

func (d *Doc) Sha256() string

Sha256 returns the hashed content of d.

func (*Doc) Size

func (d *Doc) Size() int

Size returns the length of d content.

Jump to

Keyboard shortcuts

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