file

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type System

type System struct{}

System represents an interface with the filesystem.

func NewSystem

func NewSystem() *System

NewSystem returns a new System.

func (System) Exists

func (System) Exists(path string) bool

Exists checks the existence of the file at path.

func (System) Read

func (System) Read(path string) (io.ReadCloser, error)

Read returns an io.ReadCloser from the file at path.

func (System) Walk

func (System) Walk(workspace string, extensions []string, cb func(string)) error

Walk walks recursively in workspace and calls the callback for all files that match one of the extension and is not hidden (does not start with a dot ".").

The function expects the extensions with a dot: [".md"].

func (System) Write

func (System) Write(path string) (io.WriteCloser, error)

Write returns an io.WriteCloser to the file at path.

Jump to

Keyboard shortcuts

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