Help us shape the future of Go! Take the 2026 Go Developer Survey

disk

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

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

Disk disk

func Open

func Open(root string) (*Disk, error)

Open the application

func (*Disk) Exists

func (disk *Disk) Exists(name string) (bool, error)

Exists check if the file is exists

func (*Disk) Read

func (disk *Disk) Read(name string) ([]byte, error)

Read the file content

func (*Disk) Remove

func (disk *Disk) Remove(name string) error

Remove the file

func (*Disk) Walk

func (disk *Disk) Walk(root string, handler func(root, file string, isdir bool) error, patterns ...string) error

Walk traverse folders and read file contents

func (*Disk) Watch

func (disk *Disk) Watch(handler func(event string, name string), interrupt chan uint8) error

Watch the file changes

func (*Disk) Write

func (disk *Disk) Write(name string, data []byte) error

Write the file content

Jump to

Keyboard shortcuts

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