filesystem

package
v0.0.0-...-a0115ea Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	UserHomeDir() (string, error)
	Create(name string) (commonInterfaces.FileLike, error)
}

FileSystem is an interface for a client that interacts with the local file system

func NewClient

func NewClient(
	userHomeDirFunc UserHomeDirFunc,
	createFunc CreateFunc,
) Client

NewClient injects the behavioral functions and returns a new FileSystem client configured with them

type ClientGetter

type ClientGetter struct{}

func (*ClientGetter) GetClient

func (clientGetter *ClientGetter) GetClient() Client

type CreateFunc

type CreateFunc func(name string) (commonInterfaces.FileLike, error)

CreateFunc is a function that creates a new file with the given name

type UserHomeDirFunc

type UserHomeDirFunc func() (string, error)

UserHomeDirFunc is a function that returns the user's home directory

Jump to

Keyboard shortcuts

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